-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
58 lines (53 loc) · 1.13 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3.8"
services:
# Frontend App
frontend-app:
build: ./crud-example-frontend/.
container_name: frontend-app
ports:
- "80:80"
networks:
- my-network
# Backend App
backend-app:
build: ./crud-example-backend/.
container_name: backend-app
ports:
- "8080:8080"
environment:
- DATABASE_URL=jdbc:postgresql://postgresql:5432/crud_example
- DATABASE_USERNAME=postgres
- DATABASE_PASSWORD=postgres
depends_on:
- postgresql
networks:
- my-network
# PostgreSQL
postgresql:
image: postgres:15.2
restart: always
container_name: postgresql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
networks:
- my-network
# PostgerSQL Panel
adminer-panel:
image: adminer
container_name: adminer-panel
ports:
- 9090:8080
environment:
ADMINER_DEFAULT_SERVER: postgresql
depends_on:
- postgresql
networks:
- my-network
networks:
my-network:
driver: bridge