-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (37 loc) · 918 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
38
39
40
version: "3.8"
services:
library-app:
image: library:0.0.2
container_name: library-app
build:
context: .
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=dev
- SPRING_DATASOURCE_URL=jdbc:postgresql://library-db:5432/library-db
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=postgres
- SPRING_JPA_HIBERNATE_DDL-AUTO=update
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
depends_on:
- library-db
networks:
- library-network
library-db:
image: postgres:latest
container_name: library-db
environment:
POSTGRES_DB: library-db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- library-db:/var/lib/postgresql/data
networks:
- library-network
volumes:
library-db:
networks:
library-network: