forked from amar-m-cloud/book-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (41 loc) · 966 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
41
42
version: "3.8"
services:
frontend:
container_name: book_project_frontend
build:
context: ./frontend
dockerfile: ./Dockerfile
volumes:
- ./frontend/src:/app/src
ports:
- 3000:3000
depends_on:
- backend
db:
image: postgres:14 # 14 is the latest Flyway supported version
container_name: book_project_db
restart: always
environment:
- POSTGRES_DB=book_project_db
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpassword
ports:
- "5433:5432"
backend:
container_name: book_project_backend
build:
context: ./backend
dockerfile: ./Dockerfile
args:
mvn_arg: clean package -DskipTests
restart: "no"
ports:
- "8080:8080"
environment:
- POSTGRES_DATABASE=book_project_db
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=dbpassword
- POSTGRES_HOSTNAME=db
- POSTGRES_PORT=5433
depends_on:
- db