-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
52 lines (47 loc) · 1 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
version: '3.9'
services:
# database service (public image)
database:
image: postgres:latest
networks:
- pharma-net
environment:
- POSTGRES_PASSWORD=qp9CwVoyvXUNjquQCDXN5FYVWRcjE7iR
- POSTGRES_USER=bfmnfopq
- POSTGRES_DB=bfmnfopq
dns:
hostname=john.db.elephantsql.com
env_file:
- ./.env
# backend service (public image)
backend:
image: node:latest
working_dir: /usr/src/app
volumes:
- "./back-end:/usr/src/app"
command: ["node", "app.js"]
expose:
- "8000"
redis:
image: redis
networks:
- pharma-net
# frontend service (custom image)
web:
build: .
volumes:
- "./front-end:/usr/src/app"
ports:
- "3000:3000"
networks:
- pharma-net
environment:
- DB_HOST=database
- REDIS_HOST=redis
depends_on:
- database
- backend
- redis
command: ["./wait-for-it.sh", "database:5432", "--", "node", "index.js"]
networks:
pharma-net: