-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.production.yaml
40 lines (38 loc) · 1.06 KB
/
compose.production.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
services:
postgres:
image: postgres:16.1
restart: unless-stopped
environment:
POSTGRES_DB: production
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
ports:
- "127.0.0.1:5432:5432"
volumes:
# Store the database data in a persistent volume.
- "db-data:/var/lib/postgresql/data"
app:
image: preventive-financial-control-app
build: .
restart: unless-stopped
environment:
# Connect to the database container
DATABASE_URL: postgresql://postgres:5432
# Database login credentials
DATABASE_USERNAME:
DATABASE_PASSWORD:
# Master key for decrypting credentials file
RAILS_MASTER_KEY:
# Enforce the use of TLS to encrypt HTTP connections
ENABLE_TLS: true
# Paths to TLS certificate and private key
TLS_CERTIFICATE_PATH: "/app/cert.pem"
TLS_KEY_PATH: "/app/key.pem"
ports:
- "80:3000"
- "443:3001"
volumes:
- "./cert.pem:/app/cert.pem:ro"
- "./key.pem:/app/key.pem:ro"
volumes:
db-data: