-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
92 lines (82 loc) · 2.19 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
services:
# api:
# container_name: groshi-api
# build:
# context: ./
#
# environment:
# GROSHI_HOST: 0.0.0.0
# GROSHI_PORT: 8080
#
# GROSHI_SWAGGER: true
#
# GROSHI_BCRYPT_COST: 11
# GROSHI_JWT_SECRET_KEY_FILE: /run/secrets/groshi/jwt_secret_key
# GROSHI_JWT_TTL: 744h
#
# GROSHI_POSTGRES_HOST: groshi-postgres
# GROSHI_POSTGRES_PORT: 5432
#
# GROSHI_POSTGRES_USER_FILE: /run/secrets/postgres/user
# GROSHI_POSTGRES_PASSWORD_FILE: /run/secrets/postgres/password
# GROSHI_POSTGRES_DATABASE: groshi
#
# depends_on:
# postgres:
# condition: service_healthy
#
# ports:
# - "8080:8080"
#
# secrets:
# - groshi
# - postgres
#
# postgres:
# container_name: groshi-postgres
# image: postgres:16.2
# environment:
# POSTGRES_USER_FILE: /run/secrets/postgres/user
# POSTGRES_PASSWORD_FILE: /run/secrets/postgres/password
# POSTGRES_DB: groshi
#
# volumes:
# - ./services/api/.postgres-data:/var/lib/postgresql/data
#
# secrets:
# - postgres
#
# restart: always
# healthcheck:
# test: ["CMD", "pg_isready", "-U", "groshi"] # todo: set user from docker secret
# interval: 2s
# timeout: 2s
# retries: 4
# start_period: 2s
valuta:
container_name: groshi-valuta
build:
context: ./services/valuta
volumes:
# NOTE: create an empty ./services/valuta/database.db if you are running
# the service for the first time and the file does not exist yet.
# Otherwise, docker will create a directory instead of a file.
- ./services/valuta/database.db:/var/lib/valuta/database.db
configs:
- source: valuta_currency_symbols
target: /var/lib/valuta/currency_symbols.json
environment:
VALUTA_HOST: 0.0.0.0
VALUTA_PORT: 8080
VALUTA_DATABASE_FILE: /var/lib/valuta/database.db
VALUTA_DATABASE_SYNC_PERIOD: 4h
VALUTA_DATABASE_SYNC_RETRY_PERIOD: 30s
VALUTA_CURRENCY_SYMBOLS_FILE: /var/lib/valuta/currency_symbols.json
secrets:
groshi:
file: ./secrets/groshi
postgres:
file: ./secrets/postgres
configs:
valuta_currency_symbols:
file: ./services/valuta/currency_symbols.json