-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (71 loc) · 1.59 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#version: '3.8'
#
#services:
# backend:
# image: your-backend-image:latest
# ports:
# - "8080:8080"
# environment:
# - DB_HOST=db
# - DB_PORT=5432
# # Add any other backend environment variables here
# depends_on:
# - db
#
# frontend:
# image: your-frontend-image:latest
# ports:
# - "3000:3000"
# #environment:
# # Add any frontend environment variables here
#
# db:
# image: postgres:latest
# environment:
# - POSTGRES_DB=my_database
# - POSTGRES_USER=my_user
# - POSTGRES_PASSWORD=my_password
# ports:
# - "5432:5432"
# volumes:
# - postgres_data:/var/lib/postgresql/data
#
#volumes:
# postgres_data:
version: '3.8'
services:
db:
image: postgres:13
container_name: postgres_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: employee_management
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
backend:
build:
context: .
dockerfile: Dockerfile
container_name: spring_boot_backend
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/employee_management
SPRING_DATASOURCE_USERNAME: your_db_user
SPRING_DATASOURCE_PASSWORD: your_db_password
ports:
- "8080:8080"
depends_on:
- db
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: angular_frontend
ports:
- "80:80"
depends_on:
- backend
volumes:
postgres_data: