This commit is contained in:
RM
2025-11-15 12:56:47 +03:00
parent 222db2a9d8
commit 0ddaf92dc9
3 changed files with 59 additions and 0 deletions

50
docker-compose.yaml Normal file
View File

@@ -0,0 +1,50 @@
version: '3.8'
services:
client-backend:
image: client:0.0.1
build:
context: .
dockerfile: Dockerfile
ports:
- "8181:8181"
depends_on:
- service-db
environment:
- SERVER_PORT=8181
- SPRING_DATASOURCE_URL=jdbc:postgresql://service-db/torgi
- SPRING_DATASOURCE_USERNAME=username
- SPRING_DATASOURCE_PASSWORD=password
restart: always
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8181/health || exit 1
interval: 20s
retries: 5
start_period: 20s
timeout: 10s
service-db:
image: postgres:14.7-alpine
environment:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
ports:
- "15432:5432"
volumes:
- db-data:/var/lib/postgresql/data
restart: unless-stopped
pgadmin:
container_name: pgadmin4_container
image: dpage/pgadmin4:7
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: root
ports:
- "5050:80"
volumes:
- pgadmin-data:/var/lib/pgadmin
volumes:
db-data:
pgadmin-data: