-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (73 loc) · 1.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (73 loc) · 1.83 KB
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
name: syncengine
x-php-base: &php-base
build:
context: .
dockerfile: Dockerfile
target: fpm
args:
APP_ENV: ${APP_ENV:-prod}
SYNCENGINE_VERSION: ${SYNCENGINE_VERSION:-latest}
image: syncengine-php
restart: unless-stopped
volumes:
- secrets_data:/app/config/secrets
- modules_data:/app/modules
- blueprints_data:/app/blueprints
- db_data:/app/var/data
networks:
- app
x-php-env: &php-env
APP_ENV: ${APP_ENV:-prod}
APP_DEBUG: ${APP_DEBUG:-0}
APP_SECRET: ${APP_SECRET:-}
DATABASE_URL: ${DATABASE_URL:-sqlite:////app/var/data/data.db}
MAILER_DSN: ${MAILER_DSN:-sendmail://default}
TZ: ${TZ:-UTC}
services:
server:
build:
context: .
dockerfile: Dockerfile
target: nginx
image: syncengine-nginx
restart: unless-stopped
depends_on:
php:
condition: service_healthy
ports:
- "${HTTP_PORT:-8080}:80"
networks:
- app
php:
<<: *php-base
environment:
<<: *php-env
RUN_AS_WWWDATA: "0"
RUN_MIGRATIONS: ${RUN_MIGRATIONS:-1}
healthcheck:
test: ["CMD-SHELL", "SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
worker:
<<: *php-base
environment:
<<: *php-env
RUN_AS_WWWDATA: "1"
RUN_MIGRATIONS: "0"
command: ["php", "bin/console", "messenger:consume", "async", "--time-limit=3600", "-vv"]
depends_on:
php:
condition: service_healthy
# messenger:consume stops gracefully on SIGTERM; give it time to finish
# the message it is currently handling before Docker kills it.
stop_signal: SIGTERM
stop_grace_period: 60s
networks:
app: {}
volumes:
secrets_data: {}
modules_data: {}
blueprints_data: {}
db_data: {}