initial working docker-compose
rodzic
9de0ac5108
commit
b7c1ba1510
|
@ -0,0 +1,166 @@
|
||||||
|
version: "3.6"
|
||||||
|
# 1.3.0-rc3
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: /data/env/funkwhale/.env
|
||||||
|
# environment:
|
||||||
|
# - "POSTGRES_HOST_AUTH_METHOD=trust"
|
||||||
|
image: postgres:15-alpine
|
||||||
|
volumes:
|
||||||
|
- db:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- int
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1.0'
|
||||||
|
memory: 512M
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "100m"
|
||||||
|
max-file: "5"
|
||||||
|
|
||||||
|
redis:
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: /data/env/funkwhale/.env
|
||||||
|
image: redis:7-alpine
|
||||||
|
volumes:
|
||||||
|
- cache:/data
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
|
||||||
|
|
||||||
|
celeryworker:
|
||||||
|
restart: unless-stopped
|
||||||
|
image: funkwhale/api:${FUNKWHALE_VERSION}
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
env_file: /data/env/funkwhale/.env
|
||||||
|
# Celery workers handle background tasks (such file imports or federation
|
||||||
|
# messaging). The more processes a worker gets, the more tasks
|
||||||
|
# can be processed in parallel. However, more processes also means
|
||||||
|
# a bigger memory footprint.
|
||||||
|
# By default, a worker will span a number of process equal to your number
|
||||||
|
# of CPUs. You can adjust this, by explicitly setting the --concurrency
|
||||||
|
# flag:
|
||||||
|
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
|
||||||
|
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=0
|
||||||
|
environment:
|
||||||
|
- C_FORCE_ROOT=true
|
||||||
|
volumes:
|
||||||
|
- music:/srv/funkwhale/data/music:ro
|
||||||
|
- media:/srv/funkwhale/data/media
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
- int
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '2.0'
|
||||||
|
memory: 512M
|
||||||
|
|
||||||
|
celerybeat:
|
||||||
|
restart: unless-stopped
|
||||||
|
image: funkwhale/api:${FUNKWHALE_VERSION}
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
- int
|
||||||
|
env_file: /data/env/funkwhale/.env
|
||||||
|
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
|
||||||
|
|
||||||
|
|
||||||
|
api:
|
||||||
|
restart: unless-stopped
|
||||||
|
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
- redis
|
||||||
|
env_file: /data/env/funkwhale/.env
|
||||||
|
volumes:
|
||||||
|
- music:/srv/funkwhale/data/music:ro
|
||||||
|
- media:/srv/funkwhale/data/media
|
||||||
|
- static:/srv/funkwhale/data/static
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
- int
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '2.0'
|
||||||
|
memory: 2048M
|
||||||
|
|
||||||
|
front:
|
||||||
|
restart: unless-stopped
|
||||||
|
image: funkwhale/front:${FUNKWHALE_VERSION}
|
||||||
|
depends_on:
|
||||||
|
- api
|
||||||
|
env_file: /data/env/funkwhale/.env
|
||||||
|
environment:
|
||||||
|
- "NGINX_MAX_BODY_SIZE=100M"
|
||||||
|
volumes:
|
||||||
|
# Uncomment if you want to use your previous nginx config, please let us
|
||||||
|
# know what special configuration you need, so we can support it with out
|
||||||
|
# upstream nginx configuration!
|
||||||
|
#- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
|
||||||
|
#- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
|
||||||
|
- music:/srv/funkwhale/data/music:ro
|
||||||
|
- media:/srv/funkwhale/data/media:ro
|
||||||
|
- static:/usr/share/nginx/html/staticfiles:ro
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- "5000"
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1.0'
|
||||||
|
memory: 512M
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=web"
|
||||||
|
- "traefik.http.routers.funkwhale.rule=Host(`fun.citizen4.eu`)"
|
||||||
|
- "traefik.http.routers.funkwhale.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.funkwhale.service=funkwhale"
|
||||||
|
- "traefik.http.services.funkwhale.loadbalancer.server.port=80"
|
||||||
|
- "traefik.http.routers.funkwhale.tls=true"
|
||||||
|
- "traefik.http.routers.funkwhale.tls.certresolver=ovh"
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "100m"
|
||||||
|
max-file: "5"
|
||||||
|
|
||||||
|
adminer:
|
||||||
|
image: adminer
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- int
|
||||||
|
ports:
|
||||||
|
- 8080
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 0
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
||||||
|
cache:
|
||||||
|
music:
|
||||||
|
media:
|
||||||
|
static:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
int:
|
||||||
|
# create network web: $ docker network create --scope swarm --attachable -d 'overlay' web
|
||||||
|
web:
|
||||||
|
external:
|
||||||
|
name: web
|
Ładowanie…
Reference in New Issue