dev.yml 1.41 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 29
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'
      - /app/node_modules

  postgres:
    env_file: .env.dev
    image: postgres

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

  celeryworker:
    env_file: .env.dev
    build:
      context: ./api
30
      dockerfile: docker/Dockerfile.test
31 32 33 34 35 36
    links:
     - postgres
     - redis
    command: python manage.py celery worker
    environment:
        - C_FORCE_ROOT=true
37 38
        - "DATABASE_URL=postgresql://postgres@postgres/postgres"
        - "CACHE_URL=redis://redis:6379/0"
39 40
    volumes:
      - ./api:/app
41
      - ./data/music:/music
42 43 44 45
  api:
    env_file: .env.dev
    build:
      context: ./api
46
      dockerfile: docker/Dockerfile.test
47 48 49
    command: python /app/manage.py runserver 0.0.0.0:12081
    volumes:
      - ./api:/app
50
      - ./data/music:/music
51 52 53
    environment:
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
54
    ports:
55
      - "12081:12081"
56 57 58 59
    links:
      - postgres
      - redis

60 61 62 63 64 65 66 67 68 69
  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:
70
      - "0.0.0.0:6001:6001"