-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
147 lines (140 loc) · 4.54 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
143
144
145
146
147
services:
db:
container_name: ${DOCKER_NAME:-ccdb}-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:
- "3317: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
- DB_DATABASE_TEST=testing
user: ${DOCKER_USER:-501:20}
extra_hosts:
- "host.docker.internal:host-gateway"
app:
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
container_name: ${DOCKER_NAME:-ccdb}-app
entrypoint:
- bash
- /srv/app/scripts/entrypoint.sh
depends_on:
- db
- redis
expose:
- "9000"
links:
- db:db
- redis:redis
volumes:
- .:/srv/app
init: true
environment:
HOME: /srv/app
DB_HOST: ${DOCKER_NAME:-ccdb}-db
REDIS_HOST: ${DOCKER_NAME:-ccdb}-redis
SANCTUM_STATEFUL_DOMAINS: localhost:${APP_PORT:-8011},127.0.0.1:${APP_PORT:-8011}
COMPOSER_NO_DEV: "0"
COMPOSER_AUTH: ${COMPOSER_AUTH:?You must provide valid Backpack credentials in COMPOSER_AUTH (see the .env.example)}
XDEBUG_MODE: ${XDEBUG_MODE:-debug,develop}
XDEBUG_CONFIG: ${XDEBUG_CONFIG:-client_host=host.docker.internal}
user: ${DOCKER_USER:-501:20}
extra_hosts:
- "host.docker.internal:host-gateway"
nginx:
container_name: ${DOCKER_NAME:-ccdb}-nginx
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
depends_on:
- app
ports:
- "${APP_PORT:-8011}:8080"
volumes:
- .:/srv/app
user: ${DOCKER_USER:-501:20}
init: true
entrypoint:
- /usr/sbin/nginx
- -g
- "daemon off;"
redis:
container_name: ${DOCKER_NAME:-ccdb}-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:-8036}:8025'
scheduler:
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
container_name: ${DOCKER_NAME:-ccdb}-scheduler
depends_on:
- app
entrypoint:
- bash
- -c
- |-
/srv/app/scripts/awaitdb.bash
while true
do
php artisan schedule:run --verbose --no-interaction &
sleep 60
done
volumes:
- .:/srv/app
init: true
environment:
DB_HOST: ${DOCKER_NAME:-ccdb}-db
REDIS_HOST: ${DOCKER_NAME:-ccdb}-redis
user: ${DOCKER_USER:-501:20}
extra_hosts:
- "host.docker.internal:host-gateway"
queue:
image: ${DOCKER_IMAGE:-ghcr.io/clingen-data-model/cgwi-php-11.7-8.2:v1.1.6}
container_name: ${DOCKER_NAME:-ccdb}-queue
depends_on:
- app
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
volumes:
- .:/srv/app
init: true
environment:
DB_HOST: ${DOCKER_NAME:-ccdb}-db
REDIS_HOST: ${DOCKER_NAME:-ccdb}-redis
user: ${DOCKER_USER:-501:20}
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
db:
redis: