-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (51 loc) · 1.24 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
version: "3"
services:
db:
container_name: twitter-clone-db
image: postgres:10-alpine
expose:
- "5432"
environment:
# TODO: manage passwords better
- POSTGRES_PASSWORD=NA4;6418=V]*
- POSTGRES_USER=twitter
- POSTGRES_DB=twitter-clone
networks:
- db
restart: always
api:
container_name: twitter-clone-api
image: node:latest
environment:
- NODE_ENV=production
- POSTGRES_PASSWORD=NA4;6418=V]*
- POSTGRES_USER=twitter
user: node
working_dir: /home/node/app
volumes:
- ./backend:/home/node/app
expose:
- "3000"
command: "npm start"
links:
- db:twitter-clone-db
networks:
- api
- db
restart: always
twitter-clone-proxy:
container_name: twitter-clone-proxy
image: nginx:alpine
volumes:
- ./frontend/dist:/usr/share/nginx/html:ro
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- api
links:
- api:twitter-clone-api
ports:
- "8080:80"
restart: always
networks:
db:
api: