8 Commits

4 changed files with 26 additions and 13 deletions
+6 -1
View File
@@ -6,7 +6,7 @@ steps:
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: example_com # UPDATE ME
stack: tellaweb # UPDATE ME
generate_secrets: true
purge: true
deploy_key:
@@ -18,6 +18,11 @@ steps:
STACK_NAME: example_com # UPDATE ME
LETS_ENCRYPT_ENV: staging
# Also set any config versions from abra.sh
ENTRYPOINT_CONF_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
SECRET_DB_ROOT_PASSWORD_VERSION: v1
SECRET_REDIS_PASSWORD_VERSION: v1
SECRET_JWT_SECRET_VERSION: v1
trigger:
branch:
- main
+1
View File
@@ -1,6 +1,7 @@
TYPE=tellaweb
DOMAIN=tellaweb.example.com
DOMAIN_ADMIN=admin.${DOMAIN}
## Domain aliases
#EXTRA_DOMAINS=', `www.tellaweb.example.com`'
+4 -1
View File
@@ -1,5 +1,7 @@
# tellaweb
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/tellaweb/status.svg)](https://build.coopcloud.tech/coop-cloud/tellaweb)
> One line description of the recipe
<!-- metadata -->
@@ -21,6 +23,7 @@
* `abra app config <app-name>`
* `abra app deploy <app-name>`
* Run database migrations: `abra app run <app-name> api /docker-entrypoint.sh npm run typeorm migration:run`
* Create an initial admin user: `abra app run <app-name> api /docker-entrypoint.sh npm run typeorm migration:run`
* Create an initial user: `abra app run <app-name> api /docker-entrypoint.sh npm run console users create -a EMAIL`
* Make user an admin: `abra app run <app-name> api /docker-entrypoint.sh npm run console users toggle-role EMAIL`
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
+15 -11
View File
@@ -1,12 +1,10 @@
---
services:
app:
image: horizontalorg/tellaweb-admin:1.3.9
image: horizontalorg/tellaweb-admin:beta-1.3.11
networks:
- proxy
environment:
VIRTUAL_PORT: 3000
VIRTUAL_HOST: ${DOMAIN}
NEXT_PUBLIC_MAPBOX_TOKEN: pk.eyJ1IjoiaG9yaXpvbnRhbG9yZyIsImEiOiJjbDc0d2hhMmEwMDQ0M3ZscWw0Nmh0aXB4In0.jr9aOKznaHix4OQBe5VRpQ
deploy:
restart_policy:
@@ -14,20 +12,28 @@ services:
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`admin.${DOMAIN}`${EXTRA_DOMAINS_ADMIN})"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN_ADMIN}`${EXTRA_DOMAINS_ADMIN})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname"
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.permanent=true"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.regex=^http[s]?://([^/]*)/(.*)"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.replacement=https://admin.${DOMAIN}/$${2}"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.replacement=https://${DOMAIN_ADMIN}/$${2}"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.permanent=true"
# Replicating Nginx configuration, see https://github.com/Horizontal-org/tellaweb/tree/main/nginx-config
- "traefik.http.routers.${STACK_NAME}-filedownload.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}-filedownload.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-filedownload.middlewares=file-download-headers"
- "traefik.http.routers.${STACK_NAME}-filedownload.rule=Host(`${DOMAIN_ADMIN}`${EXTRA_DOMAINS_ADMIN}) && (PathPrefix(`/file/download/`) || PathPrefix(`/file/asset/`))"
- "traefik.http.routers.${STACK_NAME}-filedownload.middlewares=${STACK_NAME}-file-headers"
- "traefik.http.middlewares.${STACK_NAME}-file-headers.headers.customresponseheaders.Accept-Ranges=bytes"
- "traefik.http.middlewares.${STACK_NAME}-file-headers.headers.customresponseheaders.Cache-Control=public, max-age=2592000"
## When you're ready for release, run "abra recipe sync <name>" to set this
- "coop-cloud.${STACK_NAME}.version=0.1.0+1.3.9"
- "coop-cloud.${STACK_NAME}.version=0.1.1+beta-1.3.11"
api:
image: horizontalorg/tellaweb-api:1.3.9
image: horizontalorg/tellaweb-api:beta-1.3.11
networks:
- proxy
- internal
@@ -42,12 +48,10 @@ services:
# start_period: 1m
environment:
PORT: 3001
VIRTUAL_PORT: 3001
VIRTUAL_HOST: ${DOMAIN}
JWT_SECRET_FILE: /run/secrets/jwt_secret
COOKIE_DOMAIN: ${DOMAIN}
COOKIE_DOMAIN: ${DOMAIN_ADMIN}
PUBLIC_DOMAIN: ${DOMAIN}
ADMIN_DOMAIN: admin.${DOMAIN}
ADMIN_DOMAIN: ${DOMAIN_ADMIN}
MYSQL_HOST: ${STACK_NAME}_db
MYSQL_DATABASE: tellaweb
MYSQL_USER: tellaweb