-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (34 loc) · 904 Bytes
/
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
services:
db:
container_name: postgres-db
image: 'postgres:16.1-alpine'
env_file: ./.env
environment:
POSTGRES_USER: $DB_USER
POSTGRES_PASSWORD: $DB_PASSWORD
POSTGRES_DB: $DB_DATABASE
ports:
- "5332:5432"
restart: unless-stopped
volumes:
- db:/var/lib/postgres
expense-manager-api:
container_name: expense-manager-api
image: 'spring-expense-manager'
restart: unless-stopped
build:
context: .
depends_on:
- db
env_file: ./.env
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/$DB_DATABASE
- SPRING_DATASOURCE_USERNAME=$DB_USER
- SPRING_DATASOURCE_PASSWORD=$DB_PASSWORD
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT=org.hibernate.dialect.PostgreSQLDialect
ports:
- "8088:8080"
stdin_open: true
volumes:
db: