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

services:
  front:
Eliot Berriot's avatar
Eliot Berriot 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
    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
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
44 45
    volumes:
      - ./api:/app
46
      - ./data/music:/music
47
  api:
48 49 50
    env_file:
      - .env.dev
      - .env
51 52
    build:
      context: ./api
53
      dockerfile: docker/Dockerfile.test
54 55 56
    command: python /app/manage.py runserver 0.0.0.0:12081
    volumes:
      - ./api:/app
57
      - ./data/music:/music
58 59 60
    environment:
      - "DATABASE_URL=postgresql://postgres@postgres/postgres"
      - "CACHE_URL=redis://redis:6379/0"
61 62 63 64
    links:
      - postgres
      - redis

65
  nginx:
66
    command: /entrypoint.sh
67 68 69
    env_file:
      - .env.dev
      - .env
70
    image: nginx
71 72
    environment:
      - "WEBPACK_DEVSERVER_PORT=${WEBPACK_DEVSERVER_PORT-8080}"
73 74 75 76 77
    links:
      - api
      - front
    volumes:
      - ./docker/nginx/conf.dev:/etc/nginx/nginx.conf
78 79
      - ./docker/nginx/entrypoint.sh:/entrypoint.sh:ro
      - ./deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf.template:ro
80 81
      - ./api/funkwhale_api/media:/protected/media
    ports:
82
      - "0.0.0.0:6001:6001"
83 84 85 86 87 88 89 90 91

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