-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
131 lines (125 loc) · 4.1 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
services:
app:
image: wayofdev/php-dev:8.3-cli-alpine-latest
container_name: ${COMPOSE_PROJECT_NAME}-app
restart: on-failure
networks:
- default
- shared
depends_on:
database:
condition: service_healthy
temporal:
condition: service_healthy
links:
- database
volumes:
- ./.github/assets:/assets:rw,cached
- ./app:/app:rw,cached
- ./.env:/app/.env
- ~/.composer:/.composer
# SSH agent forwarding on unix sockets won't work
# https://medium.com/@vanuan/ssh-and-docker-compose-7bce10b67765
# Reverting to mounting the ssh folder
- ~/.ssh:/home/www-data/.ssh
environment:
FAKETIME: '+2h'
XDEBUG_MODE: '${XDEBUG_MODE:-off}'
PHIVE_HOME: /app/.phive
dns:
8.8.8.8
command: /app/rr serve
tty: true
labels:
- traefik.enable=true
- traefik.http.routers.api-${COMPOSE_PROJECT_NAME}.rule=Host(`api.${COMPOSE_PROJECT_NAME}.docker`)
- traefik.http.routers.api-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.api-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.services.api-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8668
- traefik.http.services.api-${COMPOSE_PROJECT_NAME}.loadbalancer.server.scheme=http
logging:
driver: ${DOCKER_APP_LOG_DRIVER:-json-file}
database:
image: postgres:16.4-alpine
container_name: ${COMPOSE_PROJECT_NAME}-database
restart: on-failure
networks:
- default
ports:
- '${DB_FORWARD_PORT:-5445}:5432'
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
volumes:
- database-data:/var/lib/postgresql/data:cached
healthcheck:
test: ['CMD', 'pg_isready', '-U', '${DB_USERNAME:-spiral}', '-d', '${DB_DATABASE:-spiral}']
interval: 3s
timeout: 1s
start_period: 0s
retries: 9
logging:
driver: ${DOCKER_DATABASE_LOG_DRIVER:-json-file}
mail:
image: axllent/mailpit:v1.20
container_name: ${COMPOSE_PROJECT_NAME}-mail
restart: on-failure
networks:
- default
- shared
volumes:
- mail-data:/data
labels:
- traefik.enable=true
- traefik.http.routers.mail-${COMPOSE_PROJECT_NAME}-secure.rule=Host(`mail.${COMPOSE_PROJECT_NAME}.docker`)
- traefik.http.routers.mail-${COMPOSE_PROJECT_NAME}-secure.entrypoints=websecure
- traefik.http.routers.mail-${COMPOSE_PROJECT_NAME}-secure.tls=true
- traefik.http.services.mail-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8025
- traefik.http.services.mail-${COMPOSE_PROJECT_NAME}.loadbalancer.server.scheme=http
healthcheck:
test: ['CMD', '/mailpit', 'readyz']
interval: 10s
timeout: 5s
start_period: 2s
retries: 6
logging:
driver: ${DOCKER_MAIL_LOG_DRIVER:-json-file}
storage:
image: docker.io/bitnami/minio:2024.8.17
container_name: ${COMPOSE_PROJECT_NAME}-storage
restart: on-failure
networks:
- default
- shared
volumes:
- storage-data:/bitnami/minio/data
labels:
- traefik.enable=true
- traefik.http.routers.storage-${COMPOSE_PROJECT_NAME}.rule=Host(`storage.${COMPOSE_PROJECT_NAME}.docker`)
- traefik.http.routers.storage-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.storage-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.services.storage-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=9001
- traefik.http.services.storage-${COMPOSE_PROJECT_NAME}.loadbalancer.server.scheme=http
healthcheck:
test: ['CMD', 'mc', 'ready', 'local']
interval: 5s
timeout: 20s
start_period: 2s
retries: 5
logging:
driver: ${DOCKER_STORAGE_LOG_DRIVER:-json-file}
volumes:
database-data:
name: ${COMPOSE_PROJECT_NAME}-database-data
mail-data:
name: ${COMPOSE_PROJECT_NAME}-mail-data
storage-data:
name: ${COMPOSE_PROJECT_NAME}-storage-data
networks:
shared:
external: true
name: network.${SHARED_SERVICES_NAMESPACE}
default:
name: project.${COMPOSE_PROJECT_NAME}