-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
142 lines (135 loc) · 4.27 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
db:
container_name: ${DOCKER_NAME:-gpm}-db
image: mysql:8.0
healthcheck:
test: MYSQL_PWD=$${MYSQL_PASSWORD} mysqladmin -u $${MYSQL_USER} -h db ping
interval: 60s
start_period: 120s
retries: 5
expose:
- "3306"
ports:
- "3319:3306"
volumes:
- db:/var/lib/mysql
- .docker/mysql/db-init:/docker-entrypoint-initdb.d
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_SORT_BUFFER_SIZE=256000000
user: ${DOCKER_USER:-501:20}
app:
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
container_name: ${DOCKER_NAME:-gpm}-app
init: true
entrypoint:
- bash
- /srv/app/scripts/entrypoint.sh
depends_on:
- db
- redis
expose:
- "9000"
links:
- db:db
- redis:redis
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/srv/app
environment:
HOME: /srv/app
DB_HOST: ${DOCKER_NAME:-gpm}-db
REDIS_HOST: ${DOCKER_NAME:-gpm}-redis
SANCTUM_STATEFUL_DOMAINS: localhost:${APP_PORT:-8013},127.0.0.1:${APP_PORT:-8013}
XDEBUG_MODE: ${XDEBUG_MODE:-debug,develop}
XDEBUG_CONFIG: ${XDEBUG_SESSION:-client_host=host.docker.internal}
user: ${DOCKER_USER:-501:20}
nginx:
container_name: ${DOCKER_NAME:-gpm}-nginx
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
depends_on:
- app
ports:
- "${APP_PORT:-8013}:8080"
volumes:
- .:/srv/app
user: ${DOCKER_USER:-501:20}
init: true
entrypoint:
- /usr/sbin/nginx
- -g
- "daemon off;"
redis:
container_name: ${DOCKER_NAME:-gpm}-redis
image: redis:alpine3.18
expose:
- "6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- redis:/var/lib/redis/data
command:
- /bin/sh
- -c
- redis-server --requirepass "$${REDIS_PASSWORD:?Need to set REDIS_PASSWORD variable}"
mailpit:
image: 'axllent/mailpit:latest'
expose:
- '${FORWARD_MAILPIT_PORT:-1025}:1025'
ports:
- '${FORWARD_MAILPIT_DASHBOARD_PORT:-8038}:8025'
scheduler:
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
container_name: ${DOCKER_NAME:-gpm}-scheduler
depends_on:
- app
init: true
entrypoint:
- bash
- -c
- |-
/srv/app/scripts/awaitdb.bash
while true
do
php artisan schedule:run --verbose --no-interaction &
sleep 60
done
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/srv/app
environment:
DB_HOST: ${DOCKER_NAME:-gpm}-db
REDIS_HOST: ${DOCKER_NAME:-gpm}-redis
user: ${DOCKER_USER:-501:20}
queue:
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
container_name: ${DOCKER_NAME:-gpm}-queue
depends_on:
- app
init: true
entrypoint:
- bash
- -c
- |-
echo "role: queue"
echo "SESSION_DRIVER: $SESSION_DRIVER"
echo "CACHE_DRIVER: $CACHE_DRIVER"
echo "QUEUE_CONNECTION: $QUEUE_CONNECTION..."
/srv/app/scripts/awaitdb.bash
php /srv/app/artisan queue:work --verbose --tries=3 --timeout=90
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/srv/app
environment:
DB_HOST: ${DOCKER_NAME:-gpm}-db
REDIS_HOST: ${DOCKER_NAME:-gpm}-redis
user: ${DOCKER_USER:-501:20}
volumes:
db:
redis: