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

services:
  front:
Agate's avatar
Agate committed
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 16 17
    volumes:
      - './front:/app'

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

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

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

74
  nginx:
75 76 77
    env_file:
      - .env.dev
      - .env
78 79 80 81 82 83 84 85
    image: nginx
    links:
      - api
      - front
    volumes:
      - ./docker/nginx/conf.dev:/etc/nginx/nginx.conf
      - ./api/funkwhale_api/media:/protected/media
    ports:
86
      - "0.0.0.0:6001:6001"
87 88 89 90 91 92 93 94 95

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