Compare commits

..
Author SHA1 Message Date
Mauricio SiuandClaude Fable 5 7683947842 feat: add Weblate template
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:07:41 -06:00
9 changed files with 111 additions and 204 deletions
-51
View File
@@ -1,51 +0,0 @@
services:
synapse:
image: matrixdotorg/synapse:v1.156.0
restart: unless-stopped
# The stock entrypoint (/start.py) does not generate the signing key when a
# config file is provided, so generate any missing keys on first boot and
# make sure the data volume is owned by the synapse user (991) before
# handing over to the regular entrypoint.
entrypoint:
- /bin/sh
- -c
- |
python -m synapse.app.homeserver --config-path /config/homeserver.yaml --keys-directory /data --generate-keys
chown -R 991:991 /data
exec /start.py
environment:
SYNAPSE_CONFIG_PATH: /config/homeserver.yaml
volumes:
- synapse-data:/data
- ../files/homeserver.yaml:/config/homeserver.yaml:ro
- ../files/log.config:/config/log.config:ro
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fSs http://localhost:8008/health || exit 1"]
interval: 15s
timeout: 5s
retries: 10
start_period: 90s
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: synapse
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: synapse
# Synapse requires a database with C collation
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U synapse -d synapse"]
interval: 10s
timeout: 5s
retries: 5
volumes:
synapse-data:
postgres-data:
-39
View File
@@ -1,39 +0,0 @@
## Instructions
Synapse is deployed with public registration disabled, so you need to create the
first user (your admin account) from the command line.
### Create the first user
Open a terminal on the server running Dokploy (or use the container terminal in
the Dokploy UI) and run the following inside the `synapse` service container:
```bash
docker exec -it $(docker ps -qf "name=synapse" | head -n 1) \
register_new_matrix_user http://localhost:8008 -c /config/homeserver.yaml
```
The tool prompts for a username and password, and asks whether the user should
be an admin. It authenticates against the server using the
`registration_shared_secret` that was generated for this deployment (stored in
the mounted `homeserver.yaml`), so no registration needs to be enabled.
### Log in
Point any Matrix client (for example Element Web at https://app.element.io) at
your homeserver URL `https://your-domain` and log in with the user you just
created. You can verify the server is up with:
```bash
curl https://your-domain/_matrix/client/versions
```
### Notes
- Data (signing keys, media uploads) is stored in the `synapse-data` volume and
the database in the `postgres-data` volume.
- Federation with other Matrix servers works through `.well-known` delegation
over HTTPS (port 443). The dedicated federation port 8448 is not exposed.
- To allow open registration instead, edit `enable_registration` in the mounted
`homeserver.yaml` (see Synapse docs for the required spam-check options such
as CAPTCHA or email verification).
-16
View File
@@ -1,16 +0,0 @@
{
"id": "synapse",
"name": "Synapse",
"version": "v1.156.0",
"description": "Synapse is the reference homeserver implementation for Matrix, an open standard for secure, decentralised, real-time communication.",
"logo": "synapse.svg",
"links": {
"github": "https://github.com/element-hq/synapse",
"website": "https://element-hq.github.io/synapse/latest/",
"docs": "https://element-hq.github.io/synapse/latest/setup/installation.html"
},
"tags": [
"matrix",
"communication"
]
}
-5
View File
@@ -1,5 +0,0 @@
<svg width="75" height="32" xmlns="http://www.w3.org/2000/svg">
<g fill="#000000" fill-rule="nonzero">
<path d="M.936.732V31.25H3.13v.732H.095V0h3.034v.732zM9.386 10.407v1.544h.044a4.461 4.461 0 0 1 1.487-1.368c.58-.323 1.245-.485 1.993-.485.72 0 1.377.14 1.972.42.595.279 1.047.771 1.355 1.477.338-.5.796-.941 1.377-1.323.58-.383 1.266-.574 2.06-.574.602 0 1.16.074 1.674.22.514.148.954.383 1.322.707.366.323.653.746.859 1.268.205.522.308 1.15.308 1.887v7.633H20.71v-6.464c0-.383-.015-.743-.044-1.082a2.305 2.305 0 0 0-.242-.882 1.473 1.473 0 0 0-.584-.596c-.257-.146-.606-.22-1.047-.22-.44 0-.796.085-1.068.253-.272.17-.485.39-.639.662a2.654 2.654 0 0 0-.308.927 7.074 7.074 0 0 0-.078 1.048v6.354h-3.128v-6.398c0-.338-.007-.673-.021-1.004a2.825 2.825 0 0 0-.188-.916 1.411 1.411 0 0 0-.55-.673c-.258-.168-.636-.253-1.135-.253a2.33 2.33 0 0 0-.584.1 1.94 1.94 0 0 0-.705.374c-.228.184-.422.449-.584.794-.161.346-.242.798-.242 1.357v6.619H6.434V10.407h2.952zM25.842 12.084a3.751 3.751 0 0 1 1.233-1.17 5.37 5.37 0 0 1 1.685-.629 9.579 9.579 0 0 1 1.884-.187c.573 0 1.153.04 1.74.121.588.081 1.124.24 1.609.475.484.235.88.562 1.19.981.308.42.462.975.462 1.666v5.934c0 .516.03 1.008.088 1.478.058.471.161.824.308 1.06H32.87a4.435 4.435 0 0 1-.22-1.104c-.5.515-1.087.876-1.762 1.081a7.084 7.084 0 0 1-2.071.31c-.544 0-1.05-.067-1.52-.2a3.472 3.472 0 0 1-1.234-.617 2.87 2.87 0 0 1-.826-1.059c-.199-.426-.298-.934-.298-1.522 0-.647.114-1.18.342-1.6.227-.419.52-.753.881-1.004.36-.25.771-.437 1.234-.562.462-.125.929-.224 1.399-.298.47-.073.932-.132 1.387-.176.456-.044.86-.11 1.212-.199.353-.088.631-.217.837-.386.206-.169.301-.415.287-.74 0-.337-.055-.606-.166-.804a1.217 1.217 0 0 0-.44-.464 1.737 1.737 0 0 0-.639-.22 5.292 5.292 0 0 0-.782-.055c-.617 0-1.101.132-1.454.397-.352.264-.558.706-.617 1.323h-3.128c.044-.735.227-1.345.55-1.83zm6.179 4.423a5.095 5.095 0 0 1-.639.165 9.68 9.68 0 0 1-.716.11c-.25.03-.5.067-.749.11a5.616 5.616 0 0 0-.694.177 2.057 2.057 0 0 0-.594.298c-.17.125-.305.284-.408.474-.103.192-.154.434-.154.728 0 .28.051.515.154.706.103.192.242.342.419.453.176.11.381.187.617.231.234.044.477.066.726.066.617 0 1.094-.102 1.432-.309.338-.205.587-.452.75-.739.16-.286.26-.576.297-.87.036-.295.055-.53.055-.707v-1.17a1.4 1.4 0 0 1-.496.277zM43.884 10.407v2.096h-2.291v5.647c0 .53.088.883.264 1.059.176.177.529.265 1.057.265.177 0 .345-.007.507-.022.161-.015.316-.037.463-.066v2.426a7.49 7.49 0 0 1-.882.089 21.67 21.67 0 0 1-.947.022c-.484 0-.944-.034-1.377-.1a3.233 3.233 0 0 1-1.145-.386 2.04 2.04 0 0 1-.782-.816c-.191-.353-.287-.816-.287-1.39v-6.728H36.57v-2.096h1.894v-3.42h3.129v3.42h2.29zM48.355 10.407v2.118h.044a3.907 3.907 0 0 1 1.454-1.754 4.213 4.213 0 0 1 1.036-.497 3.734 3.734 0 0 1 1.145-.176c.206 0 .433.037.683.11v2.912a5.862 5.862 0 0 0-.528-.077 5.566 5.566 0 0 0-.595-.033c-.573 0-1.058.096-1.454.287a2.52 2.52 0 0 0-.958.783 3.143 3.143 0 0 0-.518 1.158 6.32 6.32 0 0 0-.154 1.434v5.14h-3.128V10.407h2.973zM54.039 8.642V6.06h3.128v2.582H54.04zm3.128 1.765v11.405H54.04V10.407h3.128zM58.797 10.407h3.569l2.005 2.978 1.982-2.978h3.459l-3.745 5.339 4.208 6.067h-3.57l-2.378-3.596-2.38 3.596h-3.502l4.097-6.001zM74.094 31.25V.732H71.9V0h3.035v31.982H71.9v-.732z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

-93
View File
@@ -1,93 +0,0 @@
[variables]
main_domain = "${domain}"
postgres_password = "${password:32}"
registration_shared_secret = "${password:32}"
macaroon_secret_key = "${password:32}"
form_secret = "${password:32}"
[config]
env = [
"POSTGRES_PASSWORD=${postgres_password}",
]
[[config.domains]]
serviceName = "synapse"
port = 8008
host = "${main_domain}"
[[config.mounts]]
filePath = "homeserver.yaml"
content = """
# Synapse homeserver configuration
# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
server_name: "${main_domain}"
public_baseurl: "https://${main_domain}/"
pid_file: /data/homeserver.pid
signing_key_path: "/data/signing.key"
log_config: "/config/log.config"
media_store_path: /data/media_store
report_stats: false
# Serve /.well-known/matrix/server so other homeservers can federate with
# this server over port 443 (the dedicated federation port 8448 is not exposed).
serve_server_wellknown: true
listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
bind_addresses: ['0.0.0.0']
resources:
- names: [client, federation]
compress: false
database:
name: psycopg2
args:
user: synapse
password: "${postgres_password}"
database: synapse
host: postgres
port: 5432
cp_min: 5
cp_max: 10
# Public registration is disabled. Create users with the
# register_new_matrix_user tool (see the template instructions).
enable_registration: false
registration_shared_secret: "${registration_shared_secret}"
macaroon_secret_key: "${macaroon_secret_key}"
form_secret: "${form_secret}"
trusted_key_servers:
- server_name: "matrix.org"
suppress_key_server_warning: true
"""
[[config.mounts]]
filePath = "log.config"
content = """
version: 1
formatters:
precise:
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
handlers:
console:
class: logging.StreamHandler
formatter: precise
loggers:
synapse.storage.SQL:
level: INFO
root:
level: INFO
handlers: [console]
disable_existing_loggers: false
"""
+66
View File
@@ -0,0 +1,66 @@
services:
weblate:
image: weblate/weblate:2026.7.1.1
restart: unless-stopped
depends_on:
database:
condition: service_healthy
cache:
condition: service_healthy
volumes:
- weblate-data:/app/data
- weblate-cache:/app/cache
tmpfs:
- /run
- /tmp
environment:
WEBLATE_SITE_DOMAIN: ${WEBLATE_SITE_DOMAIN}
WEBLATE_SITE_TITLE: ${WEBLATE_SITE_TITLE}
WEBLATE_ADMIN_NAME: ${WEBLATE_ADMIN_NAME}
WEBLATE_ADMIN_EMAIL: ${WEBLATE_ADMIN_EMAIL}
WEBLATE_ADMIN_PASSWORD: ${WEBLATE_ADMIN_PASSWORD}
WEBLATE_SERVER_EMAIL: ${WEBLATE_SERVER_EMAIL}
WEBLATE_DEFAULT_FROM_EMAIL: ${WEBLATE_DEFAULT_FROM_EMAIL}
WEBLATE_ENABLE_HTTPS: ${WEBLATE_ENABLE_HTTPS}
WEBLATE_ALLOWED_HOSTS: "*"
WEBLATE_REGISTRATION_OPEN: ${WEBLATE_REGISTRATION_OPEN}
POSTGRES_HOST: database
POSTGRES_PORT: 5432
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
REDIS_HOST: cache
REDIS_PORT: 6379
database:
image: postgres:18-alpine
restart: unless-stopped
volumes:
- weblate-postgres-data:/var/lib/postgresql
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
cache:
image: redis:8-alpine
restart: unless-stopped
command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"]
volumes:
- weblate-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
weblate-data:
weblate-cache:
weblate-postgres-data:
weblate-redis-data:
+18
View File
@@ -0,0 +1,18 @@
{
"id": "weblate",
"name": "Weblate",
"version": "2026.7.1.1",
"description": "Weblate is a libre web-based continuous localization platform with tight version control integration, quality checks, and support for over 50 file formats including PO, XLIFF, JSON, and Android resources.",
"logo": "weblate.svg",
"links": {
"github": "https://github.com/WeblateOrg/weblate",
"website": "https://weblate.org/",
"docs": "https://docs.weblate.org/en/latest/admin/install/docker.html"
},
"tags": [
"localization",
"translation",
"i18n",
"self-hosted"
]
}
+26
View File
@@ -0,0 +1,26 @@
[variables]
main_domain = "${domain}"
admin_password = "${password:32}"
postgres_password = "${password:32}"
[config]
env = [
"WEBLATE_SITE_DOMAIN=${main_domain}",
"WEBLATE_SITE_TITLE=Weblate",
"WEBLATE_ADMIN_NAME=Weblate Admin",
"WEBLATE_ADMIN_EMAIL=admin@${main_domain}",
"WEBLATE_ADMIN_PASSWORD=${admin_password}",
"WEBLATE_SERVER_EMAIL=weblate@${main_domain}",
"WEBLATE_DEFAULT_FROM_EMAIL=weblate@${main_domain}",
"WEBLATE_ENABLE_HTTPS=0",
"WEBLATE_REGISTRATION_OPEN=1",
"POSTGRES_USER=weblate",
"POSTGRES_PASSWORD=${postgres_password}",
"POSTGRES_DB=weblate",
]
mounts = []
[[config.domains]]
serviceName = "weblate"
port = 8080
host = "${main_domain}"
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" id="svg31" width="300" height="300" version="1.1" viewBox="0 0 300 300"><metadata id="metadata37"/><linearGradient id="a" x1=".396" x2="98.808" y1="55.253" y2="55.253" gradientTransform="scale(0.98308415,1.0172069)" gradientUnits="userSpaceOnUse"><stop id="stop2" offset="0" stop-color="#00d2e6"/><stop id="stop4" offset="1" stop-color="#2eccaa"/></linearGradient><linearGradient id="b" x1="49.017" x2="99.793" y1="137.887" y2="113.962" gradientTransform="scale(1.1630616,0.85979965)" gradientUnits="userSpaceOnUse"><stop id="stop7" offset="0" stop-opacity="0"/><stop id="stop9" offset=".514"/><stop id="stop11" offset="1" stop-opacity="0"/></linearGradient><linearGradient id="c" x1="201.822" x2="103.577" y1="57.649" y2="57.649" gradientTransform="scale(0.98308415,1.0172069)" gradientUnits="userSpaceOnUse"><stop id="stop14" offset="0" stop-color="#1fa385"/><stop id="stop16" offset="1" stop-color="#2eccaa"/></linearGradient><g style="fill:none;fill-rule:evenodd" id="g27" transform="translate(50,76)"><path style="fill:url(#a);fill-rule:nonzero" id="path21" d="m 127.24725,111.60641 c -2.88836,-0.0145 -5.76656,-0.6024 -8.47973,-1.78467 -6.11167,-2.66259 -11.49342,-7.69116 -15.87156,-14.494798 1.24856,-2.219307 2.3738,-4.517338 3.37843,-6.853465 4.40506,-10.243222 6.50003,-21.459724 6.6607,-32.59332 -0.0233,-0.220825 -0.0416,-0.442436 -0.0552,-0.664833 l -0.0121,-0.571316 c -0.01,-4.365422 -0.67459,-8.789784 -2.17667,-12.908841 -1.73043,-4.745776 -4.4887,-9.495481 -8.86498,-11.347741 -0.79519,-0.335952 -1.63162,-0.477013 -2.464161,-0.457367 -5.504872,-10.288802 -5.679939,-20.1485266 0,-29.53713169 0.10115,0 0.20619,3.9293e-4 0.30734,0.001179 6.701161,0.0738703 13.340071,2.14184679 19.021181,5.75363459 15.46928,9.8349701 23.18193,29.0007861 23.35194,47.8180741 0.002,0.220826 -3.9e-4,0.441258 -0.007,0.66169 h 0.0868 c -0.0226,19.886801 -4.80489,40.053612 -14.87495,56.978905 z m -34.299625,31.21585 c -14.447871,5.94246 -31.22819,5.62359 -45.54931,-1.02501 C 30.922601,134.1497 18.333366,119.28527 10.57986,102.31827 -2.6824097,73.29666 -2.9858585,38.603143 9.5917057,9.1367387 19.037523,12.915521 27.43683,6.8970531 27.43683,6.8970531 c 0,0 -0.01945,9.2605109 8.94785,13.9049119 -9.200724,21.556385 -8.978973,47.166601 0.241203,68.172888 4.438911,10.107269 11.219825,19.519057 20.618957,24.841647 3.354732,1.8996 7.040998,3.12602 10.833017,3.58618 0.01404,0.0219 0.02808,0.0439 0.04214,0.0658 6.696522,10.44898 15.132208,19.1568 24.827633,25.35378 z"/><path style="opacity:.3;fill:url(#b)" id="path23" d="m 127.24298,111.61346 c -2.88693,-0.0151 -5.76363,-0.60296 -8.47546,-1.78465 -6.11266,-2.66302 -11.49516,-7.69279 -15.87368,-14.498094 1.24941,-2.220476 2.37535,-4.519788 3.38055,-6.857239 1.32817,-3.088408 2.44626,-6.264833 3.36439,-9.500982 2.12803,-7.497839 30.38184,2.018075 26.0717,14.370923 -2.22386,6.372982 -5.03943,12.509222 -8.4675,18.270042 z m -34.302088,31.21157 c -14.446351,5.93959 -31.223682,5.61979 -45.542576,-1.02778 -16.475715,-7.64755 0.447392,-33.30334 9.846524,-27.98075 3.353286,1.89878 7.037819,3.12496 10.828112,3.58558 0.01567,0.0245 0.03135,0.049 0.04704,0.0735 6.694972,10.44656 15.128303,19.15278 24.8209,25.34948 z"/><path style="fill:url(#c);fill-rule:nonzero" id="path25" d="m 56.762435,54.627505 c -0.0066,-0.220432 -0.0093,-0.440865 -0.007,-0.66169 C 56.925444,35.148526 64.638101,15.982711 80.107377,6.1477407 85.788484,2.5359528 92.427399,0.46797642 99.12856,0.39410609 c 0.10115,-7.8585e-4 0.20619,-0.001179 0.307339,-0.001179 V 29.930059 c -0.832539,-0.01965 -1.668968,0.121414 -2.46416,0.457367 -4.376276,1.85226 -7.134548,6.601965 -8.864984,11.347741 -1.502072,4.119057 -2.166936,8.543418 -2.176662,12.908841 l -0.01206,0.571316 c -0.01362,0.222397 -0.0319,0.444008 -0.05524,0.664833 0.160672,11.133595 2.255636,22.350098 6.660701,32.59332 4.933377,11.471906 12.775196,22.025153 23.847186,26.848723 8.35263,3.63969 17.61171,2.78114 25.18236,-1.5057 9.39914,-5.32259 16.18005,-14.734378 20.61896,-24.841647 9.22018,-21.006287 9.44193,-46.616503 0.24121,-68.172888 8.9673,-4.644401 8.94785,-13.9049119 8.94785,-13.9049119 0,0 8.3993,6.0184679 17.84512,2.2396856 12.57756,29.4664043 12.27412,64.1599213 -0.98815,93.1815313 -7.75351,16.967 -20.34275,31.83144 -36.81846,39.47898 -14.66669,6.80904 -31.9127,6.97917 -46.59106,0.58389 C 91.618199,136.63222 80.890116,126.27466 73.171624,114.23104 61.993036,96.788212 56.699411,75.552849 56.675679,54.627505 Z"/></g></svg>

After

Width:  |  Height:  |  Size: 4.4 KiB