forked from thomasvvugt/fiber-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
47 lines (40 loc) · 999 Bytes
/
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
version: "3.9"
secrets:
secrets.env:
file: ./secrets/secrets.env
pg_secret.txt:
file: ./secrets/pg_secret.txt
services:
postgres:
image: postgres:15.1
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD_FILE: /run/secrets/pg_secret.txt
#POSTGRES_PASSWORD: postgres
POSTGRES_DB: fiberdemo
logging:
options:
max-size: 10m
max-file: "3"
ports:
- '5438:5432' # Exposed on a different port internally on docker (5432) and externally on localhost (5438)
volumes:
- ./postgres-data-15:/var/lib/postgresql/data
secrets:
- pg_secret.txt
fiber-boilerplate:
build: .
restart: unless-stopped
ports:
- "8080:8080"
depends_on:
- postgres
secrets:
- secrets.env
environment:
SECRETS_PATH: /run/secrets/secrets.env
DB_HOST: postgres
DB_PORT: 5432
SESSION_HOST: postgres
SESSION_PORT: 5432