-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (46 loc) · 1.02 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
version: '3'
services:
php:
build:
context: docker/php
args:
USER_ID: 1000
working_dir: /app
volumes:
- ~/.composer-docker/cache:/var/www/.composer/cache:delegated
- ./:/app
environment:
PHP_USER_ID: 1000
restart: ${RESTART}
nginx:
image: nginx:1.15-alpine
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./:/app
depends_on:
- php
restart: ${RESTART}
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:${DOCKER_DOMAIN}"
ports:
- ${DOCKER_PORT}
networks:
- default
- web
db:
image: postgres:11.5-alpine
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DATABASE: ${DB_NAME}
volumes:
- db_data:/var/lib/postgresql/data
ports:
- 127.0.0.1:${DOCKER_DB_PORT}:5432
restart: ${RESTART}
volumes:
db_data:
networks:
web:
external: true