-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (48 loc) · 1.13 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
version: "3.8"
volumes:
houseconnectdata:
# Define the services/containers to be run
services:
react: # Name for frontend service
build: frontend # Specify the directory of the Dockerfile
restart: always
expose:
- 3000
express: # Name for backend service (API)
build: backend # Specify the directory of the Dockerfile
restart: always
env_file:
- ./backend/.env.prod
expose:
- 8080
depends_on:
- redis
- postgres
redis: # Name for redis container
image: redis:latest
command: redis-server
restart: always
expose:
- 6379
volumes:
- houseconnectdata:/var/lib/redis
postgres: # Name for postgres container
image: postgres:latest # Specify image to build container from
restart: always
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
expose:
- 5432
volumes:
- houseconnectdata:/var/lib/postgresql
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- '80:80'
- '443:443'
depends_on:
- react
- express