-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (69 loc) · 1.67 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
70
71
72
73
74
75
76
version: '3'
services:
php:
image: yiisoftware/yii2-php:7.4-fpm
working_dir: /app
volumes:
- ~/.composer-docker/cache:/var/www/.composer/cache:delegated
- ./:/app:delegated
- ./docker/php/docker-php-entrypoint:/usr/local/bin/docker-php-entrypoint
- ./docker/php/.bashrc:/var/www/.bashrc
environment:
PHP_USER_ID: ${PHP_USER_ID}
depends_on:
- db
restart: ${RESTART}
api:
image: nginx:1.15-alpine
volumes:
- ./docker/api/default.conf:/etc/nginx/conf.d/default.conf
- ./:/app:delegated
depends_on:
- php
restart: ${RESTART}
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:${API_HOST}"
networks:
- default
- web
backend:
image: nginx:1.15-alpine
volumes:
- ./docker/backend/default.conf:/etc/nginx/conf.d/default.conf
- ./:/app:delegated
depends_on:
- php
restart: ${RESTART}
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:${BACKEND_HOST}"
networks:
- default
- web
db:
image: postgres:11.5-alpine
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_MULTIPLE_DATABASES: ${DB_MAIN},${DB_TEST}
volumes:
- ./docker/db/initdb.d:/docker-entrypoint-initdb.d
- db_data:/var/lib/postgresql/data
ports:
- 127.0.0.1:${DOCKER_DB_PORT}:5432
restart: ${RESTART}
adminer:
image: adminer
labels:
traefik.enable: 'true'
traefik.frontend.rule: 'Host:${ADMINER_HOST}'
networks:
- default
- web
restart: ${RESTART}
volumes:
db_data:
networks:
web:
external: true