-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
105 lines (100 loc) · 4.27 KB
/
docker-compose.yaml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
networks:
interns2024c-dev:
driver: bridge
traefik-proxy-blumilk-local:
external: true
volumes:
interns2024c-postgres-data:
name: interns2024c-postgres-data
interns2024c-redis-data:
name: interns2024c-redis-data
services:
app:
build:
context: ./environment/dev/app
dockerfile: Dockerfile
args:
- INSTALL_XDEBUG=${DOCKER_INSTALL_XDEBUG:-true}
- USER_ID=${DOCKER_HOST_USER_ID:-1000}
labels:
- "traefik.enable=true"
- "traefik.blumilk.environment=true"
# HTTP
- "traefik.http.routers.interns2024c-http-router.rule=Host(`interns2024c.blumilk.localhost`)"
- "traefik.http.routers.interns2024c-http-router.entrypoints=web"
# HTTP to HTTPS redirect
# - "traefik.http.routers.interns2024c-http-router.middlewares=https-redirect@file"
# HTTPS
- "traefik.http.routers.interns2024c-https-router.rule=Host(`interns2024c.blumilk.localhost`)"
- "traefik.http.routers.interns2024c-https-router.entrypoints=websecure"
- "traefik.http.routers.interns2024c-https-router.tls=true"
container_name: interns2024c-app-dev
working_dir: /application
volumes:
- ./environment/dev/app/nginx.conf:/etc/nginx/nginx.conf:ro
- ./environment/dev/app/php.ini:/usr/local/etc/php/conf.d/zzz-overrides.ini:ro
- ./environment/dev/app/php-fpm.conf:/usr/local/etc/php-fpm.d/zzz-overrides.conf:ro
- ./environment/dev/app/supervisord.conf:/etc/supervisor/custom-supervisord.conf:ro
- .:/application
ports:
- ${DOCKER_APP_HOST_PORT:-43851}:80
networks:
- interns2024c-dev
- traefik-proxy-blumilk-local
restart: unless-stopped
depends_on:
database:
condition: service_healthy
database:
image: postgres:16.3-alpine3.18@sha256:64e18e8fb3e9c9aac89ac590c5dd8306b862478404f76cd9b5f7720d012b4c47
container_name: interns2024c-db-dev
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_DATABASE}
- PGDATA=/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready --dbname ${DB_DATABASE} --username ${DB_USERNAME}"]
interval: 3s
timeout: 3s
retries: 5
ports:
- ${DOCKER_DATABASE_HOST_PORT:-43853}:5432
volumes:
- interns2024c-postgres-data:/var/lib/postgresql/data
networks:
- interns2024c-dev
restart: unless-stopped
mailpit:
image: axllent/mailpit:v1.20.5@sha256:cd75e91719cace4e3100eab9f848ecf2ecdd7f4db01e1573a0114769dad4ba2e
container_name: interns2024c-mailpit-dev
labels:
- "traefik.enable=true"
- "traefik.blumilk.environment=true"
# HTTP
- "traefik.http.routers.interns2024c-mailpit-http-router.rule=Host(`interns2024c-mailpit.blumilk.localhost`)"
- "traefik.http.routers.interns2024c-mailpit-http-router.entrypoints=web"
# HTTP to HTTPS redirect
# - "traefik.http.routers.erasmus-mailpit-http-router.middlewares=https-redirect@file"
# HTTPS
- "traefik.http.routers.interns2024c-mailpit-https-router.rule=Host(`interns2024c-mailpit.blumilk.localhost`)"
- "traefik.http.routers.interns2024c-mailpit-https-router.entrypoints=websecure"
- "traefik.http.routers.interns2024c-mailpit-https-router.tls=true"
# LOADBALANCER MAILPIT PORT
- "traefik.http.services.interns2024c-mailpit.loadbalancer.server.port=8025"
networks:
- interns2024c-dev
- traefik-proxy-blumilk-local
ports:
- ${DOCKER_MAILPIT_DASHBOARD_HOST_PORT:-63854}:8025
restart: unless-stopped
redis:
image: redis:7.2.5-alpine3.19@sha256:8f157725f8eee31e65a8d4765f1f986d76aedc1a0503345dfb63a2b1b5a441ee
container_name: interns2024c-redis-dev
ports:
- ${DOCKER_REDIS_HOST_PORT:-43852}:6379
volumes:
- interns2024c-redis-data:/data
networks:
- interns2024c-dev
restart: unless-stopped