forked from relaticle/relaticle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
167 lines (162 loc) · 4.92 KB
/
compose.yml
File metadata and controls
167 lines (162 loc) · 4.92 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
services:
app:
build:
context: .
dockerfile: Dockerfile
target: production
image: ghcr.io/relaticle/relaticle:latest
restart: unless-stopped
ports:
- "${APP_PORT:-80}:8080"
environment:
APP_NAME: ${APP_NAME:-Relaticle}
APP_ENV: ${APP_ENV:-production}
APP_KEY: ${APP_KEY:?APP_KEY is required}
APP_DEBUG: ${APP_DEBUG:-false}
APP_TIMEZONE: ${APP_TIMEZONE:-UTC}
APP_URL: ${APP_URL:-http://localhost}
APP_PANEL_DOMAIN: ${APP_PANEL_DOMAIN:-}
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
LOG_LEVEL: ${LOG_LEVEL:-warning}
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: ${DB_DATABASE:-relaticle}
DB_USERNAME: ${DB_USERNAME:-relaticle}
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
REDIS_HOST: redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-null}
REDIS_PORT: 6379
CACHE_STORE: redis
SESSION_DRIVER: redis
QUEUE_CONNECTION: redis
MAIL_MAILER: ${MAIL_MAILER:-log}
MAIL_HOST: ${MAIL_HOST:-}
MAIL_PORT: ${MAIL_PORT:-587}
MAIL_USERNAME: ${MAIL_USERNAME:-}
MAIL_PASSWORD: ${MAIL_PASSWORD:-}
MAIL_ENCRYPTION: ${MAIL_ENCRYPTION:-tls}
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS:-hello@example.com}
MAIL_FROM_NAME: ${MAIL_FROM_NAME:-Relaticle}
# serversideup/php Laravel automations
AUTORUN_ENABLED: "true"
AUTORUN_LARAVEL_MIGRATION: "true"
AUTORUN_LARAVEL_MIGRATION_ISOLATION: "true"
volumes:
- storage:/var/www/html/storage/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/up"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
horizon:
build:
context: .
dockerfile: Dockerfile
target: production
image: ghcr.io/relaticle/relaticle:latest
restart: unless-stopped
command: ["php", "/var/www/html/artisan", "horizon"]
stop_signal: SIGTERM
environment:
APP_NAME: ${APP_NAME:-Relaticle}
APP_ENV: ${APP_ENV:-production}
APP_KEY: ${APP_KEY:?APP_KEY is required}
APP_DEBUG: ${APP_DEBUG:-false}
APP_URL: ${APP_URL:-http://localhost}
APP_PANEL_DOMAIN: ${APP_PANEL_DOMAIN:-}
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: ${DB_DATABASE:-relaticle}
DB_USERNAME: ${DB_USERNAME:-relaticle}
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
REDIS_HOST: redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-null}
REDIS_PORT: 6379
QUEUE_CONNECTION: redis
# Disable automations for worker container
AUTORUN_ENABLED: "false"
volumes:
- storage:/var/www/html/storage/app
depends_on:
app:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "healthcheck-horizon"]
start_period: 10s
scheduler:
build:
context: .
dockerfile: Dockerfile
target: production
image: ghcr.io/relaticle/relaticle:latest
restart: unless-stopped
command: ["php", "/var/www/html/artisan", "schedule:work"]
stop_signal: SIGTERM
environment:
APP_NAME: ${APP_NAME:-Relaticle}
APP_ENV: ${APP_ENV:-production}
APP_KEY: ${APP_KEY:?APP_KEY is required}
APP_DEBUG: ${APP_DEBUG:-false}
APP_URL: ${APP_URL:-http://localhost}
APP_PANEL_DOMAIN: ${APP_PANEL_DOMAIN:-}
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: ${DB_DATABASE:-relaticle}
DB_USERNAME: ${DB_USERNAME:-relaticle}
DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
REDIS_HOST: redis
REDIS_PASSWORD: ${REDIS_PASSWORD:-null}
REDIS_PORT: 6379
QUEUE_CONNECTION: redis
# Disable automations for scheduler container
AUTORUN_ENABLED: "false"
volumes:
- storage:/var/www/html/storage/app
depends_on:
app:
condition: service_healthy
healthcheck:
test: ["CMD", "healthcheck-schedule"]
start_period: 10s
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_DATABASE:-relaticle}
POSTGRES_USER: ${DB_USERNAME:-relaticle}
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-relaticle} -d ${DB_DATABASE:-relaticle}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres:
redis:
storage: