dev.yml 2.31 KB
Newer Older
1
version: '3'
2 3 4

services:
  front:
5
    build: front
6 7 8
    env_file:
      - .env.dev
      - .env
9 10
    environment:
      - "HOST=0.0.0.0"
11
      - "WEBPACK_DEVSERVER_PORT=${WEBPACK_DEVSERVER_PORT-8080}"
12
    ports:
13
      - "${WEBPACK_DEVSERVER_PORT-8080}:${WEBPACK_DEVSERVER_PORT-8080}"
14 15
    volumes:
      - './front:/app'
16
      - './po:/po'
17 18

  postgres:
19 20 21
    env_file:
      - .env.dev
      - .env
22 23 24
    image: postgres

  redis:
25 26 27
    env_file:
      - .env.dev
      - .env
28 29 30
    image: redis:3.0

  celeryworker:
31 32 33
    env_file:
      - .env.dev
      - .env
34 35
    build:
      context: ./api
36
      dockerfile: docker/Dockerfile.test
37 38 39
    links:
     - postgres
     - redis
40
    command: celery -A funkwhale_api.taskapp worker -l debug
41
    environment:
42 43 44 45 46 47
      - "DJANGO_ALLOWED_HOSTS=localhost"
      - "DJANGO_SETTINGS_MODULE=config.settings.local"
      - "DJANGO_SECRET_KEY=dev"
      - C_FORCE_ROOT=true
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
48
      - "FUNKWHALE_URL=http://localhost"
49 50
    volumes:
      - ./api:/app
51
      - ./data/music:/music
52
  api:
53 54 55
    env_file:
      - .env.dev
      - .env
56 57
    build:
      context: ./api
58
      dockerfile: docker/Dockerfile.test
59 60 61
    command: python /app/manage.py runserver 0.0.0.0:12081
    volumes:
      - ./api:/app
62
      - ./data/music:/music
63
    environment:
64
      - "PYTHONDONTWRITEBYTECODE=true"
65
      - "DJANGO_ALLOWED_HOSTS=localhost,nginx"
66 67
      - "DJANGO_SETTINGS_MODULE=config.settings.local"
      - "DJANGO_SECRET_KEY=dev"
68 69
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
70
      - "FUNKWHALE_URL=http://localhost"
71 72 73 74
    links:
      - postgres
      - redis

75
  nginx:
76
    command: /entrypoint.sh
77 78 79
    env_file:
      - .env.dev
      - .env
80
    image: nginx
81 82
    environment:
      - "WEBPACK_DEVSERVER_PORT=${WEBPACK_DEVSERVER_PORT-8080}"
83 84 85 86 87
    links:
      - api
      - front
    volumes:
      - ./docker/nginx/conf.dev:/etc/nginx/nginx.conf
88 89
      - ./docker/nginx/entrypoint.sh:/entrypoint.sh:ro
      - ./deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf.template:ro
90 91
      - ./api/funkwhale_api/media:/protected/media
    ports:
92
      - "0.0.0.0:6001:6001"
93 94 95 96 97 98 99 100 101

  docs:
    build: docs
    command: python serve.py
    volumes:
      - ".:/app/"
    ports:
      - '35730:35730'
      - '8001:8001'