-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
62 lines (61 loc) · 1.8 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
version: '3'
services:
backend:
build:
context: ./docker/backend/php-7.3
volumes:
- ./:/var/www
- ./docker/backend/php-7.3/php.ini:/usr/local/etc/php/conf.d/90-php.ini
- ./docker/backend/php-7.3/opcache.ini:/usr/local/etc/php/conf.d/91-opcache.ini
- ./docker/backend/php-7.3/xdebug.ini:/usr/local/etc/php/conf.d/92-xdebug.ini
- ./docker/backend/php-7.3/entrypoint.sh:/entrypoint.sh
env_file:
- .env
- .env.local
environment:
- DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@database:${DATABASE_PORT}/${DATABASE_NAME}"
- APP_ENV=${BACKEND_ENV:-dev}
- FROM_SCRATCH=${FROM_SCRATCH:-N}
user: "www-data:www-data"
entrypoint: /entrypoint.sh
depends_on: [database]
frontend:
image: node:latest
user: node
working_dir: /home/node/app
env_file:
- .env
- .env.local
environment:
- NODE_ENV=${FRONTEND_ENV-dev}
volumes:
- ./:/home/node/app
expose: [8081]
command: npm run container-start-${FRONTEND_ENV:-dev}
webserver:
image: nginx:latest
volumes:
- ./:/var/www
- ./docker/webserver/nginx/default.conf:/etc/nginx/default.conf
ports:
- 80:80
- 443:443
env_file:
- .env
- .env.local
environment:
- NGINX_HOST=${HOSTNAME_MASK}
command: /bin/bash -c "envsubst < /etc/nginx/default.conf > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
depends_on: [backend]
database:
image: mysql:5.7
ports:
- ${DATABASE_PORT}:${DATABASE_PORT}
env_file:
- .env
- .env.local
environment:
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}