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

services:

  front:
Eliot Berriot's avatar
Eliot Berriot committed
6
    build: front
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    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
27
      dockerfile: docker/Dockerfile.test
28 29 30
    links:
     - postgres
     - redis
31
    command: celery -A funkwhale_api.taskapp worker -l debug
32
    environment:
33 34 35 36 37 38
      - "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"
Eliot Berriot's avatar
Eliot Berriot committed
39
      - "FUNKWHALE_URL=http://funkwhale.test"
40 41
    volumes:
      - ./api:/app
42
      - ./data/music:/music
43 44 45 46
  api:
    env_file: .env.dev
    build:
      context: ./api
47
      dockerfile: docker/Dockerfile.test
48 49 50
    command: python /app/manage.py runserver 0.0.0.0:12081
    volumes:
      - ./api:/app
51
      - ./data/music:/music
52
    environment:
53
      - "DJANGO_ALLOWED_HOSTS=localhost,nginx"
54 55
      - "DJANGO_SETTINGS_MODULE=config.settings.local"
      - "DJANGO_SECRET_KEY=dev"
56 57
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
Eliot Berriot's avatar
Eliot Berriot committed
58
      - "FUNKWHALE_URL=http://funkwhale.test"
59 60 61 62
    links:
      - postgres
      - redis

63 64 65 66 67 68 69 70 71 72
  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:
73
      - "0.0.0.0:6001:6001"