forked from monetr/monetr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
75 lines (74 loc) · 2.11 KB
/
docker-compose.yaml
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
services:
postgres:
image: postgres:17
environment:
POSTGRES_PASSWORD: superSecretPasswordPleaseChangeMe
POSTGRES_USER: postgres
POSTGRES_DB: monetr
volumes:
- postgresData:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
restart: unless-stopped
networks:
- monetr_network
valkey:
image: valkey/valkey:8.0.1
healthcheck:
test: [ "CMD", "valkey-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
restart: unless-stopped
networks:
- monetr_network
monetr:
image: ghcr.io/monetr/monetr:latest
healthcheck:
test: "timeout 5s bash -c ':> /dev/tcp/127.0.0.1/4000' || exit 1"
interval: 30s
timeout: 10s
retries: 10
start_period: 5s
restart: unless-stopped
command:
- serve
# Setup the database and perform migrations.
- --migrate
# Since certificates will not have been created, make some.
- --generate-certificates
ports:
- "4000:4000"
depends_on:
valkey:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
# Contains certificates generated on startup as well as config
- monetrData:/etc/monetr
environment:
# After creating your own user, it is recommended to disable sign ups if
# your monetr instance is exposed to the public internet. Otherwise
# strangers may be able to use your instance themselves.
MONETR_ALLOW_SIGN_UP: ${MONETR_ALLOW_SIGN_UP:-true}
MONETR_PG_USERNAME: postgres
MONETR_PG_PASSWORD: superSecretPasswordPleaseChangeMe
MONETR_PG_DATABASE: monetr
MONETR_PG_ADDRESS: postgres
MONETR_REDIS_ENABLED: "true"
MONETR_REDIS_ADDRESS: valkey
MONETR_STORAGE_ENABLED: ${MONETR_STORAGE_ENABLED:-true}
MONETR_STORAGE_PROVIDER: ${MONETR_STORAGE_PROVIDER:-filesystem}
networks:
- monetr_network
volumes:
monetrData:
postgresData:
networks:
monetr_network: