-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
51 lines (50 loc) · 1.16 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
version: '3.8'
services:
appdb:
image: postgres
container_name: appdb
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: oy159753
POSTGRES_DB: appdb
ports:
- "5432:5432"
volumes:
- app-db-data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
depends_on:
- appdb
react-app:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: react-app
ports:
- "3000:3000"
depends_on:
- spring-boot-app
spring-boot-app:
build:
context: ./backend
dockerfile: Dockerfile
container_name: spring-boot-app
ports:
- "8080:8080"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: oy159753
SPRING_DATASOURCE_URL: jdbc:postgresql://appdb:5432/appdb
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: oy159753
SPRING_DATASOURCE_DRIVER_CLASS_NAME: org.postgresql.Driver
SPRING_PROFILES_ACTIVE: docker
depends_on:
- appdb
volumes:
app-db-data: