-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (48 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
47
48
49
50
51
version: '3.8'
services:
db:
image: postgres:13
#command: ./docker-compose-up.sh # Use the script as the command
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: mydatabase #simple for sake of time, should be using .env variables and or ansible vault for security
POSTGRES_USER: user
POSTGRES_PASSWORD: password
backend:
build:
context: ./backend
dockerfile: Dockerfile
command: ./entry-and-populate-db.sh python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./backend:/backend
ports:
- "8000:8000"
depends_on:
- db
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- frontend-node-modules:/frontend/node_modules
- ./frontend:/frontend
ports:
- "3000:3000"
depends_on:
- backend
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]" # You can change this
PGADMIN_DEFAULT_PASSWORD: "adminpassword" # And this too
ports:
- "8080:80"
depends_on:
- db
volumes:
- pgadmin_data:/var/lib/pgadmin
volumes:
postgres_data:
frontend-node-modules:
pgadmin_data: