From 36658a8d4b033cec1e8550a2af27c5fc6bab91c1 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Sat, 11 Jan 2025 19:03:12 -0600 Subject: [PATCH] Overhaul with port definitions --- compose/castopod.yml | 34 --------------------- compose/forgejo.yml | 11 +++++-- compose/languagetool.yaml | 10 ------- compose/lemmy.yml | 63 +++++++++++++++++++++++++++++++++++++++ compose/linkwarden.yml | 4 +-- compose/minio.yml | 2 +- compose/pipingserver.yml | 4 +-- compose/vaultwarden.yml | 6 ++-- 8 files changed, 80 insertions(+), 54 deletions(-) delete mode 100644 compose/castopod.yml delete mode 100644 compose/languagetool.yaml create mode 100644 compose/lemmy.yml diff --git a/compose/castopod.yml b/compose/castopod.yml deleted file mode 100644 index ac5b064..0000000 --- a/compose/castopod.yml +++ /dev/null @@ -1,34 +0,0 @@ -services: - castopod: - image: castopod/castopod:latest - volumes: - - ${ROOT_DIR}/castopod-media:/var/www/castopod/public/media - environment: - MYSQL_DATABASE: castopod - MYSQL_USER: castopod - MYSQL_PASSWORD: ${DB_PASSWORD} - CP_BASEURL: "https://castopod.example.com" - CP_ANALYTICS_SALT: ${ANALYTICS_SALT} - CP_CACHE_HANDLER: redis - CP_REDIS_HOST: redis - CP_REDIS_PASSWORD: ${REDIS_PASSWORD} - ports: - - 8000:8000 - restart: unless-stopped - - mariadb: - image: mariadb:11.2 - volumes: - - ${ROOT_DIR}/castopod-db:/var/lib/mysql - environment: - MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} - MYSQL_DATABASE: castopod - MYSQL_USER: castopod - MYSQL_PASSWORD: ${DB_PASSWORD} - restart: unless-stopped - - redis: - image: redis:7.2-alpine - command: --requirepass ${REDIS_PASSWORD} - volumes: - - ${ROOT_DIR}/castopod-cache:/data \ No newline at end of file diff --git a/compose/forgejo.yml b/compose/forgejo.yml index 101c62c..1d5f6c8 100644 --- a/compose/forgejo.yml +++ b/compose/forgejo.yml @@ -15,12 +15,14 @@ services: environment: FORGEJO__security__INSTALL_LOCK: "true" FORGEJO__log__LEVEL: "debug" + # Repos FORGEJO__repository__ENABLE_PUSH_CREATE_USER: "true" FORGEJO__repository__DEFAULT_PUSH_CREATE_PRIVATE: "false" FORGEJO__repository__DEFAULT_REPO_UNITS: "repo.code,repo.actions" + # Server FORGEJO__server__ROOT_URL: https://${ROOT_URL} FORGEJO__server__SSH_DOMAIN: ${ROOT_URL} - FORGEJO__server__SSH_PORT: 69 + FORGEJO__server__SSH_PORT: ${SSH_PORT} FORGEJO__server__START_SSH_SERVER: false # PostgreSQL configuration FORGEJO__database__DB_TYPE: postgres @@ -28,8 +30,11 @@ services: FORGEJO__database__NAME: forgejo FORGEJO__database__USER: ${POSTGRES_USER} FORGEJO__database__PASSWD: ${POSTGRES_PASSWORD} + FORGEJO__service_DISABLE_REGISTRATION: true + # Federation + FORGEJO__federation_ENABLED: true volumes: - ${ROOT_DIR}/forgejo_data:/data ports: - - '${APP_PORT}:3000' - - '${SSH_PORT}:22' \ No newline at end of file + - "${APP_PORT}:3000" + - "${SSH_PORT}:22" diff --git a/compose/languagetool.yaml b/compose/languagetool.yaml deleted file mode 100644 index b52fbb8..0000000 --- a/compose/languagetool.yaml +++ /dev/null @@ -1,10 +0,0 @@ -services: - languagetool: - image: erikvl87/languagetool - container_name: languagetool - ports: - - ${APP_PORT}:8010 - environment: - - langtool_languageModel=/ngrams - volumes: - - ${ROOT_DIR}/ngrams:/ngrams \ No newline at end of file diff --git a/compose/lemmy.yml b/compose/lemmy.yml new file mode 100644 index 0000000..60e7a88 --- /dev/null +++ b/compose/lemmy.yml @@ -0,0 +1,63 @@ +services: + lemmy: + image: dessalines/lemmy:0.19.8 + networks: + - lemmyinternal + - lemmyexternal + ports: + - ${APP_PORT}:8536 + restart: always + environment: + - RUST_LOG="warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_db_schema=info,lemmy_db_views=info,lemmy_db_views_actor=info,lemmy_db_views_moderator=info,lemmy_routes=info,lemmy_utils=info,lemmy_websocket=info" + - RUST_BACKTRACE=1 + volumes: + - ${ROOT_DIR}/lemmy.hjson:/config/config.hjson + depends_on: + - postgres + - pictrs + + lemmy-ui: + image: dessalines/lemmy-ui:0.19.8 + networks: + - lemmyexternal + ports: + - ${UI_PORT}:1234 + environment: + - LEMMY_UI_LEMMY_INTERNAL_HOST=lemmy:8536 + - LEMMY_UI_LEMMY_EXTERNAL_HOST=49.13.85.225:1236 + - LEMMY_HTTPS=false + depends_on: + - lemmy + restart: always + + pictrs: + networks: + - lemmyinternal + image: asonix/pictrs:0.3.1 + hostname: pictrs + environment: + - PICTRS__API_KEY=${API_KEY} + user: 991:991 + volumes: + - ${ROOT_DIR}/volumes/pictrs:/mnt + restart: always + + postgres: + networks: + - lemmyinternal + image: postgres:15-alpine + hostname: postgres + + environment: + - POSTGRES_USER=${DB_USER} + - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_DB=${DB_NAME} + volumes: + - ${ROOT_DIR}/volumes/postgres:/var/lib/postgresql/data + restart: always + +networks: + lemmyinternal: + driver: bridge + internal: true + lemmyexternal: diff --git a/compose/linkwarden.yml b/compose/linkwarden.yml index c4c4113..a1ccdeb 100644 --- a/compose/linkwarden.yml +++ b/compose/linkwarden.yml @@ -12,8 +12,8 @@ services: restart: always image: ghcr.io/linkwarden/linkwarden:latest ports: - - 3445:3000 + - ${APP_PORT}:3000 volumes: - ${ROOT_DIR}/data:/data/data depends_on: - - postgres \ No newline at end of file + - postgres diff --git a/compose/minio.yml b/compose/minio.yml index 7939597..3514572 100644 --- a/compose/minio.yml +++ b/compose/minio.yml @@ -9,4 +9,4 @@ services: - ${ROOT_DIR}:/data ports: - ${S3_PORT}:9000 - - ${CONSOLE_PORT}:9001 \ No newline at end of file + - ${APP_PORT}:9001 diff --git a/compose/pipingserver.yml b/compose/pipingserver.yml index e774687..c06111d 100644 --- a/compose/pipingserver.yml +++ b/compose/pipingserver.yml @@ -1,5 +1,5 @@ services: - piping-server-pkg: + srv: image: nwtgck/piping-server ports: - - 8282:8080 \ No newline at end of file + - ${APP_PORT}:8080 diff --git a/compose/vaultwarden.yml b/compose/vaultwarden.yml index 17467a5..22a6499 100644 --- a/compose/vaultwarden.yml +++ b/compose/vaultwarden.yml @@ -6,7 +6,7 @@ services: image: vaultwarden/server:latest restart: unless-stopped ports: - - '${APP_PORT}:80' + - "${SSH_PORT}:80" environment: ADMIN_TOKEN: ${ADMIN_TOKEN} WEBSOCKET_ENABLED: true @@ -18,5 +18,7 @@ services: SMTP_USERNAME: ${SMTP_USERNAME} SMTP_PASSWORD: ${SMTP_PASSWORD} DOMAIN: ${DOMAIN} + ORG_GROUPS_ENABLED: ${ORG_GROUPS_ENABLED} + EXPERIMENTAL_CLIENT_FEATURE_FLAGS: ${EXPERIMENTAL_CLIENT_FEATURE_FLAGS} volumes: - - ${ROOT_DIR}:/data:rw \ No newline at end of file + - ${ROOT_DIR}:/data:rw