-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
docker-compose.example.yml
74 lines (65 loc) · 1.81 KB
/
docker-compose.example.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
68
69
70
71
72
73
74
# ===========================================================================
# Example Docker Compose file
# ===========================================================================
#
# Purpose:
# --------
#
# This file is an example Docker Compose configuration for self hosting
# Maybe on your local machine or on a cloud VPS.
#
# The configuration below is a "standard" setup, but may require modification
# for your specific environment.
#
# Setup:
# ------
#
# To run this, you should read the setup guide:
#
# https://github.com/maybe-finance/maybe/blob/main/docs/hosting/docker.md
#
# Troubleshooting:
# ----------------
#
# If you run into problems, you should open a Discussion here:
#
# https://github.com/maybe-finance/maybe/discussions/categories/general
#
services:
app:
image: ghcr.io/maybe-finance/maybe:latest
volumes:
- app-storage:/rails/storage
ports:
- 3000:3000
restart: unless-stopped
environment:
SELF_HOSTED: "true"
RAILS_FORCE_SSL: "false"
RAILS_ASSUME_SSL: "false"
GOOD_JOB_EXECUTION_MODE: async
SECRET_KEY_BASE: ${SECRET_KEY_BASE:?}
DB_HOST: postgres
POSTGRES_DB: ${POSTGRES_DB:-maybe_production}
POSTGRES_USER: ${POSTGRES_USER:-maybe_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:16
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER:-maybe_user}
POSTGRES_DB: ${POSTGRES_DB:-maybe_production}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
app-storage:
postgres-data: