Compare commits

..

3 Commits

Author SHA1 Message Date
f
a97746b191 fix: the admin command requires a tty 2025-02-06 16:43:19 -03:00
f
9dde935a1d fix: migrate during startup 2025-02-06 16:37:39 -03:00
f
45e563b875 fix: mount frontend as a shared volume 2025-02-06 16:37:18 -03:00
4 changed files with 25 additions and 20 deletions

View File

@ -30,6 +30,4 @@ For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).
Before you deploy: `abra app cmd <app> secrets --local` Before you deploy: `abra app cmd <app> secrets --local`
After you deploy: After you deploy:
- `cp -r frontend/* /srv/funkwhale/front/dist` - `abra app cmd -T <app> api admin`
- `abra app cmd <app> api migrate`
- `abra app cmd <app> api admin`

View File

@ -1,5 +1,5 @@
export NGINX_CONFIG_VERSION=v2 export NGINX_CONFIG_VERSION=v2
export APP_ENTRYPOINT_VERSION=v1 export APP_ENTRYPOINT_VERSION=v2
secrets() { secrets() {
docker context use default > /dev/null 2>&1 docker context use default > /dev/null 2>&1

View File

@ -31,6 +31,26 @@ x-volumes: &default-volumes
- frontend-data:/srv/funkwhale/front/dist:ro - frontend-data:/srv/funkwhale/front/dist:ro
services: services:
api:
image: funkwhale/funkwhale:1.2
environment: *default-env
secrets: *default-secrets
volumes:
- music-data:/srv/funkwhale/data/music:ro
- media-data:/srv/funkwhale/data/media
- static-data:/srv/funkwhale/data/static
- frontend-data:/app/frontend:ro
depends_on:
- db
- cache
configs:
- source: app_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
command: /app/compose/django/server.sh
networks:
- internal
app: app:
image: nginx:1.27.1 image: nginx:1.27.1
environment: *default-env environment: *default-env
@ -86,22 +106,6 @@ services:
networks: networks:
- internal - internal
api:
image: funkwhale/funkwhale:1.2
environment: *default-env
secrets: *default-secrets
volumes: *default-volumes
depends_on:
- db
- cache
configs:
- source: app_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint: /docker-entrypoint.sh
command: /app/compose/django/server.sh
networks:
- internal
db: db:
image: postgres:10-alpine image: postgres:10-alpine

View File

@ -29,6 +29,9 @@ export DATABASE_URL="postgres://funkwhale:$DATABASE_PASSWORD@db:5432/funkwhale"
file_env "DJANGO_SECRET_KEY" file_env "DJANGO_SECRET_KEY"
# migrate before starting
python manage.py migrate
# upstream entrypoint # upstream entrypoint
# https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/api/Dockerfile # https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/api/Dockerfile
/app/compose/django/entrypoint.sh "$@" /app/compose/django/entrypoint.sh "$@"