forked from bunnyshell/demo-books
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (45 loc) · 1.22 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
version: '3.4'
services:
backend:
container_name: bunnyshell-books-backend
build:
context: ./backend
target: ${FRONTEND_BUILD_TARGET:-dev} # use "prod" for production
volumes:
- ./backend:/usr/src/app/backend
environment:
- POSTGRES_HOST=db # name of the "db" service
- POSTGRES_DB=bunny_books
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=need-to-replace
- FRONTEND_URL=${FRONTEND_URL-http://books.local.bunnyshell.com:8080}
ports:
- "3080:3080"
depends_on:
- db
db:
container_name: bunnyshell-books-db
image: postgres
restart: always
user: postgres
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=bunny_books
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=need-to-replace
expose:
- 5432
frontend:
container_name: bunnyshell-books-frontend
build:
context: ./frontend
target: ${FRONTEND_BUILD_TARGET:-dev} # use "prod" for production
args:
REACT_APP_BASE_API: ${BACKEND_URL-http://books-api.local.bunnyshell.com:3080}
volumes:
- ./frontend:/var/www/frontend:delegated
ports:
- "8080:8080"
volumes:
db-data: