-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
67 lines (61 loc) · 1.68 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
version: "3.9"
services:
web:
build:
context: .
dockerfile: Dockerfile
args:
SETTINGS: production
command: bash -c "node build/src/index.js"
volumes:
- .:/microservice:rw
- /static:/static
environment:
DATABASE_URL: postgresql://sk1122:satyam%23789@db:5432/jarvis?schema=public
image: jarvis
ports:
- 5000:5000
restart: "on-failure"
depends_on:
- db
# prisma-migrate:
# container_name: prisma-migrate
# build: ./prisma
# env_file:
# - .env
# environment:
# - DATABASE_URL="postgresql://sk1122:satyam%23789@db:5432/jarvis"
# depends_on:
# - db
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- 80:80
volumes:
- .:/home/app/microservice/static
depends_on:
- web
restart: "on-failure"
# certbot:
# image: certbot/certbot
# restart: unless-stopped
# volumes:
# - ./nginx/certbot/conf:/etc/letsencrypt
# - ./nginx/certbot/www:/var/www/certbot
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
db:
restart: always
image: postgres:latest
environment:
POSTGRES_HOST: "postgres"
POSTGRES_USER: "sk1122"
POSTGRES_PASSWORD: "satyam#789"
POSTGRES_DB: "jarvis"
ports:
- "5432:5432"
volumes:
- database-data:/var/lib/postgresql/sdata/
volumes:
database-data: