version: '3'
services:
app:
container_name: 2kurs_php_nginx
volumes:
- ../:/var/www/app
build:
context: ../
dockerfile: docker/Dockerfile
ports:
- '80:80'
depends_on:
- mysql
- redis
networks:
- '2kurs'
redis:
container_name: 2kurs_redis
image: redis:5.0.6
restart: always
volumes:
- 2kurs_redis:/data
ports:
- '6379:6379'
logging:
driver: none
networks:
- '2kurs'
mysql:
container_name: 2kurs_mysql
image: mariadb:10.3.23
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- 2kurs_mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: 2kurs
MYSQL_USER: 2kurs
MYSQL_PASSWORD: 2kurs
ports:
- '3306:3306'
logging:
driver: none
networks:
- '2kurs'
networks:
2kurs:
driver: bridge
volumes:
2kurs_mysql: {}
2kurs_redis: {}