Skip to content

Commit

Permalink
Add dynamic compose for haven (#6113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancelot-Enguerrand authored Dec 23, 2024
1 parent 025b7cd commit 394fdb2
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/haven/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"name": "Haven",
"available": true,
"exposable": true,
"dynamic_config": true,
"port": 8130,
"id": "haven",
"tipi_version": 3,
"tipi_version": 4,
"version": "latest",
"categories": ["social"],
"description": "Haven is a private blog application built with Ruby on Rails. Write what you want, create accounts for people you want to share with, keep up with each other using built-in RSS.",
Expand Down Expand Up @@ -35,5 +36,5 @@
],
"supported_architectures": ["amd64", "arm64"],
"created_at": 1691943801422,
"updated_at": 1723566284000
"updated_at": 1734908295125
}
57 changes: 57 additions & 0 deletions apps/haven/docker-compose.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"services": [
{
"name": "haven",
"image": "ghcr.io/havenweb/haven:latest",
"isMain": true,
"internalPort": 3000,
"environment": {
"RAILS_ENV": "production",
"HAVEN_DB_HOST": "haven-db",
"HAVEN_DB_NAME": "haven",
"HAVEN_DB_ROLE": "haven",
"HAVEN_DB_PASSWORD": "${HAVEN_DB_PASSWORD}",
"HAVEN_USER_EMAIL": "${HAVEN_USER_EMAIL}",
"HAVEN_USER_PASS": "${HAVEN_USER_PASSWORD}"
},
"dependsOn": ["haven-db"],
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/storage",
"containerPath": "/storage"
}
]
},
{
"name": "haven-db",
"image": "postgres:13.2-alpine",
"environment": {
"POSTGRES_HOST_AUTH_METHOD": "trust",
"POSTGRES_USER": "haven"
},
"volumes": [
{
"hostPath": "${APP_DATA_DIR}/data/db",
"containerPath": "/var/lib/postgresql/data"
}
],
"command": [
"postgres",
"-c",
"max_connections=1000",
"-c",
"synchronous_commit=off",
"-c",
"fsync=off",
"-c",
"full_page_writes=off",
"-c",
"max_wal_size=4GB",
"-c",
"checkpoint_timeout=30min",
"-c",
"wal_level=logical"
]
}
]
}

0 comments on commit 394fdb2

Please sign in to comment.