docker-compose.yml 2.27 KB
Newer Older
1
2
3
4
5
6
7
8
version: '3'

services:

  postgres:
    restart: unless-stopped
    env_file: .env
    image: postgres:9.4
9
10
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
11
12
13
14
15
16

  redis:
    restart: unless-stopped
    env_file: .env
    image: redis:3
    volumes:
17
      - ./data/redis:/data
18
19
20
21
22

  celeryworker:
    restart: unless-stopped
    image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
    env_file: .env
23
24
25
26
27
28
29
30
    # 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
31
    command: celery -A funkwhale_api.taskapp worker -l INFO
32
33
34
35
36
37
    links:
      - postgres
      - redis
    environment:
      - C_FORCE_ROOT=true
    volumes:
38
      - ./data/music:/music:ro
39
      - ./data/media:/app/funkwhale_api/media
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

  celerybeat:
    restart: unless-stopped
    image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
    env_file: .env
    command: celery -A funkwhale_api.taskapp beat -l INFO
    links:
      - postgres
      - redis

  api:
    restart: unless-stopped
    image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
    env_file: .env
    volumes:
55
      - ./data/music:/music:ro
56
57
      - ./data/media:/app/funkwhale_api/media
      - ./data/static:/app/staticfiles
58
      - ./front/dist:/frontend
59
60
61
62
63
    ports:
      - "${FUNKWHALE_API_IP:-127.0.0.1}:${FUNKWHALE_API_PORT:-5000}:5000"
    links:
      - postgres
      - redis
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

  # If you want to have the nginx proxy managed by docker for some reason
  # (i.e. if you use apache as a proxy on your host),
  # you can uncomment the following lines.
  # nginx:
  #   image: nginx
  #   links:
  #     - api
  #   volumes:
  #     - ./nginx.conf:/etc/nginx/conf.d/funkwhale.conf:ro
  #     - ./funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
  #     - ./data/media:/srv/funkwhale/data/media:ro
  #     - ./front/dist:/srv/funkwhale/front/dist:ro
  #     - ./data/static:/srv/funkwhale/data/static/:ro
  #   ports:
  #     - "127.0.0.1:5001:80"