-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
55 lines (51 loc) · 1.3 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '3.8'
services:
db-postgresql:
container_name: db-postgresql-crud-container
hostname: db-postgresql-crud-container
image: postgres:16.1
env_file:
- ./app-config.env
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: user_backend
POSTGRES_PASSWORD: password_backend
POSTGRES_DB: authcruddb
ports:
- "5432:5432"
networks:
- developer-network
volumes:
- postgresql_data:/data/postgresql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user_backend" ]
interval: 30s
timeout: 2s
retries: 5
start_period: 5s
auth-crud-demo:
container_name: auth-crud-demo-container
hostname: auth-crud-demo-container
build:
context: .
dockerfile: Dockerfile
env_file:
- ./app-config.env
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db-postgresql:5432/authcruddb
- SPRING_DATASOURCE_USERNAME=user_backend
- SPRING_DATASOURCE_PASSWORD=password_backend
- SPRING_JPA_HIBERNATE_DDL_AUTO=create
ports:
- "8080:8080"
- "8787:8787" # DEBUG
depends_on:
db-postgresql:
condition: service_started
networks:
- developer-network
networks:
developer-network:
driver: bridge
volumes:
postgresql_data: