-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
37 lines (37 loc) · 932 Bytes
/
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
version: '3.9'
services:
db:
image: postgres:16.1-alpine
container_name: postgres
ports:
- 5432:5432
volumes:
- ./pg_data:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_DB: wallet_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "pg_isready" , "-U", "postgres"]
interval: 30s
timeout: 10s
retries: 5
restart: always
app:
image: bifurcated/wallet:latest
container_name: application
ports:
- 8000:8000
environment:
POSTGRES_DB: wallet_db
POSTGRES_HOST: db
JAVA_OPTS: "-XX:+UseContainerSupport -XX:+UseZGC -Xmx512M -Xlog:gc"
restart: always
depends_on:
db:
condition: service_healthy
links:
- db