dev.yml 1.65 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
version: '2'

services:

  front:
    build:
      dockerfile: docker/Dockerfile.dev
      context: ./front
    env_file: .env.dev
    environment:
      - "HOST=0.0.0.0"
    ports:
      - "8080:8080"
    volumes:
      - './front:/app'

  postgres:
    env_file: .env.dev
    image: postgres

  redis:
    env_file: .env.dev
    image: redis:3.0

  celeryworker:
    env_file: .env.dev
    build:
      context: ./api
29
      dockerfile: docker/Dockerfile.test
30 31 32
    links:
     - postgres
     - redis
33
    command: celery -A funkwhale_api.taskapp worker -l debug
34
    environment:
35 36 37 38 39 40
      - "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"
41 42
    volumes:
      - ./api:/app
Agate's avatar
Agate committed
43
      - ./data/music:/music
44 45 46 47
  api:
    env_file: .env.dev
    build:
      context: ./api
Agate's avatar
Agate committed
48
      dockerfile: docker/Dockerfile.test
49 50 51
    command: python /app/manage.py runserver 0.0.0.0:12081
    volumes:
      - ./api:/app
Agate's avatar
Agate committed
52
      - ./data/music:/music
Agate's avatar
Agate committed
53
    environment:
54 55 56
      - "DJANGO_ALLOWED_HOSTS=localhost"
      - "DJANGO_SETTINGS_MODULE=config.settings.local"
      - "DJANGO_SECRET_KEY=dev"
Agate's avatar
Agate committed
57 58
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
59
    ports:
Agate's avatar
Agate committed
60
      - "12081:12081"
61 62 63 64
    links:
      - postgres
      - redis

65 66 67 68 69 70 71 72 73 74
  nginx:
    env_file: .env.dev
    image: nginx
    links:
      - api
      - front
    volumes:
      - ./docker/nginx/conf.dev:/etc/nginx/nginx.conf
      - ./api/funkwhale_api/media:/protected/media
    ports:
75
      - "0.0.0.0:6001:6001"