-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
69 lines (66 loc) · 1.63 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
version: '3.9'
services:
db:
container_name: db
image: postgres:10.5
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
PGDATA: /var/lib/postgresql/data
logging:
options:
max-size: 10m
max-file: "3"
ports:
- "5432:5432"
networks:
- db
volumes:
- ./db/data:/var/lib/postgresql/data # comment out to run init script every time
- ./db/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
# db_manager: # only needed for pgadmin
# container_name: db_manager
# image: dpage/pgadmin4
# environment:
# PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-admin@localhost.com}
# PGADMIN_DEFAULT_USERNAME: ${PGADMIN_DEFAULT_USERNAME:-admin}
# PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
# volumes:
# - ./db/db_manager:/root/.pgadmin
# ports:
# - "${PGADMIN_PORT:-5050}:80"
# depends_on:
# - db
# networks:
# - db
# restart: unless-stopped
server:
build:
context: ./
dockerfile: Dockerfile
image: assignment-2-159-352-server
container_name: assignment-2-159-352-node-server
command: npm run start
volumes:
- /usr/src/app/server/node_modules
ports:
- "5555:8000"
env_file: ./server/.env
environment:
- NODE_ENV=development
depends_on:
- db
networks:
- db
- app-network
networks:
app-network:
driver: bridge
db:
driver: bridge
volumes:
data-volume:
node_modules:
web-root:
driver: local