-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (51 loc) · 1.22 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
version: '3'
secrets:
db_user:
file: ./secrets/db_user.txt
db_password:
file: ./secrets/db_password.txt
jwt_private_key:
file: ./secrets/jwt_private_key.pem
jwt_public_key:
file: ./secrets/jwt_public_key.pem
pepper_key:
file: ./secrets/pepper_key.txt
services:
database:
image: 'postgres'
ports:
- "5432:5432"
secrets:
- db_user
- db_password
environment:
POSTGRES_USER_FILE: /run/secrets/db_user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
volumes:
- ./sql:/docker-entrypoint-initdb.d/
restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
secrets:
- db_user
- db_password
- jwt_private_key
- jwt_public_key
- pepper_key
environment:
DB_HOST: database
DB_PORT: 5432
DB_USER_FILE: /run/secrets/db_user
DB_PASSWORD_FILE: /run/secrets/db_password
DB_NAME: hermes
MAX_OPEN_CONNS: 5
MAX_IDLE_CONNS: 2
JWT_PRIVATE_KEY_FILE: /run/secrets/jwt_private_key
JWT_PUBLIC_KEY_FILE: /run/secrets/jwt_public_key
BCRYPT_COST: 15
PEPPER_KEY_FILE: /run/secrets/pepper_key
restart: unless-stopped