-
Notifications
You must be signed in to change notification settings - Fork 34
/
docker-compose.yml
67 lines (66 loc) · 1.62 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
version: "3.9"
services:
database:
image: postgres:latest
volumes:
- ./backend/postgres-data:/var/lib/postgresql/data
- ./backend/sql/create_tables.sql:/docker-entrypoint-initdb.d/1_create_tables.sql
- ./backend/sql/dummy_data.sql:/docker-entrypoint-initdb.d/2_dummy_data.sql
- ./backend/sql/PLU_data.sql:/docker-entrypoint-initdb.d/3_PLU_data.sql
- ./backend/sql/dummy_data2.sql:/docker-entrypoint-initdb.d/4_dummy_data.sql
networks:
- local
ports:
- "5432:${DB_PORT}"
restart: always
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- PGDATA=/var/lib/pg_data
db_admin:
image: dpage/pgadmin4
ports:
- "82:80"
restart: always
networks:
- local
environment:
- PGADMIN_DEFAULT_EMAIL=$PGADMIN_EMAIL
- PGADMIN_DEFAULT_PASSWORD=$PGADMIN_PASSWORD
node:
build:
context: ./backend
dockerfile: ./Dockerfile
target: node
container_name: node
volumes:
- ./backend/src:/app/backend/src
platform: linux/amd64
depends_on:
- database
environment:
- DB_USER=$DB_USER
- DB_PASSWORD=$DB_PASSWORD
- DB_NAME=$DB_NAME
- DB_HOST=$DB_HOST
- DB_PORT=$DB_PORT
restart: always
networks:
- local
ports:
- 3001:3001
react:
build:
context: ./frontend
ports:
- "3000:3000"
environment:
- WATCHPACK_POLLING=true
container_name: react
networks:
- local
volumes:
- ./frontend/src:/app/frontend/src
- ./frontend/public:/app/frontend/public
networks:
local: