Skip to content

Commit

Permalink
Add docker-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
bifrurcated committed Jan 13, 2024
1 parent 1499bd8 commit 2f17e4c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit 2f17e4c

Please sign in to comment.