-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
56 lines (53 loc) · 1.41 KB
/
docker-compose-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: '3.3'
services:
magazine-db:
image: percona:5.7.24-centos
restart: always
networks:
- magazine
environment:
MYSQL_DATABASE: ${MYSQL_DB_NAME}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
ports:
- ${MYSQL_HOST_PORT}:3306
volumes:
- .docker/mysql/mysqld.cnf:/etc/mysql/conf.d/mysqld.cnf
magazine-php:
depends_on:
- magazine-db
restart: always
build:
context: .
dockerfile: .docker/php/Dockerfile
networks:
- magazine
volumes:
- .:/var/www/magazine.docker
- .docker/php/php-fpm.d:/etc/php-fpm.d
- .docker/php/php.d/0-main.ini:/etc/php.d/0-main.ini
- .docker/php/php.d/10-tzone.ini:/etc/php.d/10-tzone.ini
magazine-nginx:
image: nginx:1.15-alpine
depends_on:
- magazine-php
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:magazine.docker
- traefik.docker.network=proxy
networks:
- magazine
- proxy
volumes:
- .:/var/www/magazine.docker
- .docker/nginx/magazine.conf:/etc/nginx/conf.d/magazine.conf
- .docker/nginx/cert/magazine.docker.pem:/etc/nginx/certs/magazine.docker.crt
- .docker/nginx/cert/magazine.docker-key.pem:/etc/nginx/certs/magazine.docker.key
ports:
- 81:80
networks:
proxy:
external: true
magazine:
driver: bridge