-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
69 lines (63 loc) · 1.29 KB
/
docker-compose.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
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3.9"
services:
php:
build:
context: .
target: prod
depends_on:
- db
networks:
- db
- php
environment:
- APP_ENV=${APP_ENV}
- APP_SECRET=${APP_SECRET}
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_USER=${DATABASE_USER}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
volumes:
- ./app:/app:rw,cached
nodejs:
build:
context: .
target: infection_nodejs
image: infection-nodejs:latest
depends_on:
- php
networks:
- db
- php
environment:
- PHP_HOST=php
- PHP_PORT=9000
volumes:
- ./app:/srv/app:rw,cached
- ./app/public:/srv/app/public:rw,delegated
ports:
- "35729:35729"
nginx:
image: nginx:1.15-alpine
depends_on:
- php
networks:
- php
volumes:
# todo move to dockerfile and skip volume? both lines
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./app/public:/app/public
ports:
- "8098:80"
db:
image: mysql:8.0.33
environment:
- MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD}
- MYSQL_DATABASE=${DATABASE_NAME}
- MYSQL_USER=${DATABASE_USER}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
networks:
- db
ports:
- "3354:3306"
networks:
db:
php: