2024-06-13 16:19:05 -04:00
|
|
|
# ===========================================================================
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
|
2024-05-07 00:52:14 +02:00
|
|
|
services:
|
|
|
|
|
|
|
|
app:
|
|
|
|
image: ghcr.io/maybe-finance/maybe:latest
|
2024-06-13 16:19:05 -04:00
|
|
|
|
2024-05-10 06:10:23 -04:00
|
|
|
volumes:
|
2024-07-05 14:16:02 -04:00
|
|
|
- app-storage:/rails/storage
|
2024-06-13 16:19:05 -04:00
|
|
|
|
2024-05-07 00:52:14 +02:00
|
|
|
ports:
|
2024-06-13 16:19:05 -04:00
|
|
|
- 3000:3000
|
|
|
|
|
2024-05-07 00:52:14 +02:00
|
|
|
restart: unless-stopped
|
2024-06-13 16:19:05 -04:00
|
|
|
|
2024-05-07 00:52:14 +02:00
|
|
|
environment:
|
2024-06-13 16:19:05 -04:00
|
|
|
SELF_HOSTING_ENABLED: "true"
|
|
|
|
RAILS_FORCE_SSL: "false"
|
|
|
|
RAILS_ASSUME_SSL: "false"
|
2024-05-10 06:10:23 -04:00
|
|
|
GOOD_JOB_EXECUTION_MODE: async
|
2024-06-13 16:19:05 -04:00
|
|
|
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:?}
|
|
|
|
|
2024-05-07 00:52:14 +02:00
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
postgres:
|
|
|
|
image: postgres:16
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
environment:
|
2024-06-13 16:19:05 -04:00
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-maybe_user}
|
2024-05-10 06:10:23 -04:00
|
|
|
POSTGRES_DB: ${POSTGRES_DB:-maybe_production}
|
2024-05-07 00:52:14 +02:00
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
|
|
|
|
healthcheck:
|
2024-06-13 16:19:05 -04:00
|
|
|
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
|
2024-05-07 00:52:14 +02:00
|
|
|
interval: 5s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
volumes:
|
2024-07-05 14:16:02 -04:00
|
|
|
app-storage:
|
2024-05-10 06:10:23 -04:00
|
|
|
postgres-data:
|