-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
60 lines (56 loc) · 1.66 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
60 lines (56 loc) · 1.66 KB
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
version: '3.5'
networks:
back:
driver: bridge
front:
external: true
name: ${DOCKER_NETWORK_REVERSE_PROXY}
volumes:
composer-cache:
db-data:
services:
php:
image: ${DOCKER_IMAGE_PHP}
build:
context: ./docker/php
args:
IMAGE: ${DOCKER_BASE_IMAGE_PHP}
container_name: ${DOCKER_CONTAINER_BASE_NAME}_php
depends_on:
- postgres
networks:
- back
- front
environment:
UID: ${UID}
GID: ${GID}
UNAME: ${UNAME}
volumes:
- "composer-cache:/home/${UNAME}/.composer"
- ".:/opt/ant-api"
labels:
traefik.http.routers.http.rule: "Host(`${DOCKER_HOSTNAME}`)"
traefik.http.routers.http.middlewares: "${TRAEFIK_MIDDLEWARE_REDIRECT}"
traefik.http.routers.http.entryPoints: "${TRAEFIK_ENTRYPOINT_HTTP}"
traefik.http.routers.https.rule: "Host(`${DOCKER_HOSTNAME}`)"
traefik.http.routers.https.entryPoints: "${TRAEFIK_ENTRYPOINT_HTTPS}"
traefik.http.routers.https.tls: true
traefik.http.middlewares.redirecthttps.redirectscheme.scheme: https
traefik.http.middlewares.redirecthttps.redirectscheme.permanent: true
traefik.docker.network: "${DOCKER_NETWORK_REVERSE_PROXY}"
postgres:
image: ${DOCKER_IMAGE_POSTGRES}
container_name: ${DOCKER_CONTAINER_BASE_NAME}_postgres
networks:
- back
volumes:
- db-data:${DOCKER_POSTGRES_DATADIR}
environment:
POSTGRES_DB: ${DATABASE_NAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_USER: ${DATABASE_USER}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d '${DATABASE_NAME}'"]
interval: 10s
timeout: 5s
retries: 5