-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
63 lines (58 loc) · 1.26 KB
/
docker-compose.prod.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
version: '3.9'
services:
server:
build: ./server
container_name: server
depends_on:
postgres:
condition: service_healthy
restart: on-failure
ports:
- 5000:5000
env_file:
- ./server/.env
environment:
NODE_ENV: production
# PORT: 5000
# PROTOCOL: http
# HOST: localhost
# SWAGGER_URL: docs
# DATABASE_URL: postgresql://postgres:postgres@jetup_db/test?schema=public
links:
- postgres
postgres:
image: postgres:14.5-alpine
container_name: postgres
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
ports:
- 5433:5432
env_file:
- ./server/.env
volumes:
- postgres_data:/var/lib/postgresql/data
web:
build:
context: ./client
dockerfile: client/Dockerfile
container_name: web
restart: always
depends_on:
- server
ports:
- 3000:3000
env_file:
- ./client/.env
# environment:
# - CHOKIDAR_USEPOLLING=true
volumes:
- ./client:/usr/src/app
# - /usr/src/app/node_modules
# stdin_open: true # option for delevopment
# tty: true
volumes:
postgres_data: