-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
43 lines (40 loc) · 962 Bytes
/
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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "9090:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_DB}
SPRING_DATASOURCE_USERNAME: ${DB_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD}
depends_on:
- postgres
networks:
- app-network
restart: unless-stopped
postgres:
image: 'postgres:latest'
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USERNAME}
ports:
- "5432:5432"
networks:
- app-network
pgadmin:
image: 'dpage/pgadmin4:latest'
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
PGADMIN_LISTEN_PORT: 5050
ports:
- '5050:5050'
networks:
- app-network
networks:
app-network:
driver: bridge