-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
122 lines (116 loc) · 4 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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.toby-http-router.rule=Host(`toby.blumilk.localhost`)"
- "traefik.http.routers.toby-http-router.entrypoints=web"
# HTTP to HTTPS redirect
# - "traefik.http.routers.toby-http-router.middlewares=https-redirect@file"
# HTTPS
- "traefik.http.routers.toby-https-router.rule=Host(`toby.blumilk.localhost`)"
- "traefik.http.routers.toby-https-router.entrypoints=websecure"
- "traefik.http.routers.toby-https-router.tls=true"
container_name: toby-app-dev
working_dir: /application
volumes:
- toby-unit-data:/var/lib/unit
- ./environment/dev/app/php.ini:/usr/local/etc/php/conf.d/zzz-overrides.ini:ro
- ./environment/dev/app/supervisord.conf:/etc/supervisor/custom-supervisord.conf:ro
- .:/application
ports:
- ${DOCKER_APP_HOST_PORT:-8751}:80
networks:
- toby-dev
- traefik-proxy-blumilk-local
restart: unless-stopped
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
database:
image: postgres:15@sha256:8e97b8526ed19304b144f7478bc9201646acf0723cdc100e9bb7495712cbadb6
container_name: toby-db-dev
environment:
- PGPASSWORD=${DOCKER_DEV_DB_ROOT_PASSWORD}
- POSTGRES_DB=${DOCKER_DEV_DB_DATABASE}
- POSTGRES_USER=${DOCKER_DEV_DB_USERNAME}
- POSTGRES_PASSWORD=${DOCKER_DEV_DB_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready --dbname ${DOCKER_DEV_DB_DATABASE} --username ${DOCKER_DEV_DB_USERNAME}" ]
interval: 3s
timeout: 3s
retries: 5
ports:
- ${DOCKER_DATABASE_HOST_PORT:-5432}:5432
volumes:
- toby-pgsql-data:/var/lib/postgresql/data
networks:
- toby-dev
restart: unless-stopped
redis:
image: redis:7.0-alpine3.16@sha256:2700d5097763fda285c463f4eefc3d0730a2df2a9d48e66707b19d5a5e5f23d4
container_name: toby-redis-dev
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
interval: 3s
timeout: 3s
retries: 5
ports:
- ${DOCKER_REDIS_HOST_PORT:-6379}:6379
volumes:
- toby-redis-data:/data
networks:
- toby-dev
restart: unless-stopped
mailpit:
image: axllent/mailpit:v1.20@sha256:cd75e91719cace4e3100eab9f848ecf2ecdd7f4db01e1573a0114769dad4ba2e
container_name: toby-mailpit-dev
labels:
- "traefik.enable=true"
- "traefik.blumilk.environment=true"
# HTTP
- "traefik.http.routers.toby-mailpit-http-router.rule=Host(`toby-mailpit.blumilk.localhost`)"
- "traefik.http.routers.toby-mailpit-http-router.entrypoints=web"
# HTTP to HTTPS redirect
# - "traefik.http.routers.toby-mailpit-http-router.middlewares=https-redirect@file"
# HTTPS
- "traefik.http.routers.toby-mailpit-https-router.rule=Host(`toby-mailpit.blumilk.localhost`)"
- "traefik.http.routers.toby-mailpit-https-router.entrypoints=websecure"
- "traefik.http.routers.toby-mailpit-https-router.tls=true"
# LOADBALANCER MAILPIT PORT
- "traefik.http.services.toby-mailpit.loadbalancer.server.port=8025"
ports:
- ${DOCKER_MAILPIT_DASHBOARD_HOST_PORT:-8025}:8025
networks:
- toby-dev
- traefik-proxy-blumilk-local
restart: unless-stopped
selenium:
image: selenium/standalone-chrome@sha256:3e48c9040f1948ee07283c18b7efc2b1687ce8513e4d3aeb3e34fa6058a61abc
container_name: toby-selenium-dev
volumes:
- /dev/shm:/dev/shm
networks:
- toby-dev
restart: unless-stopped
networks:
toby-dev:
driver: bridge
traefik-proxy-blumilk-local:
external: true
volumes:
toby-pgsql-data:
name: toby-pgsql-data
toby-redis-data:
name: toby-redis-data
toby-unit-data:
name: toby-unit-data