-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml
executable file
·50 lines (49 loc) · 1.31 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
services:
snapp:
image: test
ports:
- 3000:3000
healthcheck:
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3000/health", "||", "exit", "1"]
environment:
ADMIN_PASSWORD: password
DATABASE_PROVIDER: sqlite # mysql | postgres
DATABASE_URL: file:./db.sqlite
# DATABASE_URL: postgres://root:password@postgres:5432/snapp
# DATABASE_URL: mysql://root:password@mariadb:3306/snapp
TOKEN_SECRET: $(openssl rand --base64 32)
volumes:
- snapp:/app
- ./entrypoint.sh:/usr/local/bin/entrypoint.sh
# mariadb:
# image: mariadb:latest
# ports:
# - 3306:3306
# environment:
# MYSQL_ROOT_PASSWORD: password
# MYSQL_DATABASE: snapp
# volumes:
# - ../sql:/var/lib/mysql
# healthcheck:
# test: ['CMD', 'healthcheck.sh', '--su-mysql', '--connect', '--innodb_initialized']
# start_period: 1m
# start_interval: 10s
# interval: 1m
# timeout: 5s
# retries: 3
postgres:
image: postgres:17.4-alpine
ports:
- 5432:5432
volumes:
- ../postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=password
- POSTGRES_USER=root
- POSTGRES_DB=snapp
volumes:
snapp: