-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod.yml
45 lines (41 loc) · 998 Bytes
/
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
version: '3'
services:
database:
image: mscam/symfony-demo-db:latest
build:
context: ./docker/database
env_file:
- ./.envs/.prod/.database
# ports:
# - "3306:3306"
volumes:
- ./docker/database/init.sql:/docker-entrypoint-initdb.d/init.sql
- db-data:/var/lib/mysql
php-fpm:
image: mscam/symfony-demo-php-fpm:latest
build:
context: .
dockerfile: ./docker/php-fpm/Dockerfile
depends_on:
- database
env_file:
- ./.envs/.prod/.app
volumes:
- ./app:/var/www
command: ["serve", "prod"]
nginx:
image: mscam/symfony-demo-nginx:latest
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
volumes:
- ./app:/var/www
# - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./docker/nginx/sites/:/etc/nginx/sites-available
# - ./docker/nginx/conf.d/:/etc/nginx/conf.d
depends_on:
- php-fpm
ports:
- "80:80"
volumes:
db-data: