-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
50 lines (45 loc) · 1.07 KB
/
docker-compose.yaml
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
version: '3'
services:
database:
restart: unless-stopped
image: postgres:15
expose:
- 5432
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_PORT: "5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 5s
retries: 5
app:
restart: unless-stopped
expose:
- 3000
build:
context: ./app
environment:
DATABASE_URL: "postgres://postgres:postgres@database:5432/postgres?sslmode=disable&connect_timeout=30"
depends_on:
database:
condition: service_healthy
reverse-proxy:
restart: unless-stopped
image: staticfloat/nginx-certbot
ports:
- 80:80/tcp
- 443:443/tcp
environment:
- CERTBOT_EMAIL=valiafetisov@gmail.com
- CERTBOT_DOMAIN=chainreviewer.com
- ENVSUBST_VARS=CERTBOT_DOMAIN
volumes:
- letsencrypt:/etc/letsencrypt
- ./nginx.conf:/etc/nginx/user.conf.d/nginx.conf:ro
depends_on:
- app
volumes:
letsencrypt: