Something something like soundcloud but not like soundcloud.
Log in, upload records, done.
Simple, easy, KISS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
3.8 KiB

  1. version: "3"
  2. services:
  3. front:
  4. build: front
  5. env_file:
  6. - .env.dev
  7. - .env
  8. environment:
  9. - "HOST=0.0.0.0"
  10. - "REEL2BITS_HOSTNAME=${REEL2BITS_HOSTNAME-localhost}"
  11. - "REEL2BITS_HOSTNAME_SUFFIX=reel2bits.test"
  12. - "REEL2BITS_HOSTNAME_PREFIX=${COMPOSE_PROJECT_NAME}"
  13. ports:
  14. - "8081:8081"
  15. volumes:
  16. - ./front:/app
  17. - /app/node_modules
  18. - ./deploy/docker/local.json:/app/config/local.json.template:ro
  19. networks:
  20. - internal
  21. postgres:
  22. env_file:
  23. - .env.dev
  24. - .env
  25. image: postgres:${POSTGRES_VERSION-11}
  26. command: postgres -c log_min_duration_statement=0
  27. volumes:
  28. - "./data/${COMPOSE_PROJECT_NAME-node1}/postgres:/var/lib/postgresql/data"
  29. networks:
  30. - internal
  31. redis:
  32. env_file:
  33. - .env.dev
  34. - .env
  35. image: redis:3.0
  36. volumes:
  37. - "./data/${COMPOSE_PROJECT_NAME-node1}/redis:/data"
  38. networks:
  39. - internal
  40. api:
  41. env_file:
  42. - .env.dev
  43. - .env
  44. build: &backend
  45. context: ./api
  46. dockerfile: Dockerfile
  47. entrypoint: docker/dev-entrypoint.sh
  48. command: flask run --host 0.0.0.0 --port 8000
  49. volumes:
  50. - ./api:/app
  51. - ./data/uploads:/data/uploads
  52. environment:
  53. - "SQLALCHEMY_DATABASE_URI=postgresql://postgres@postgres/postgres"
  54. - "AUTHLIB_INSECURE_TRANSPORT=1"
  55. - "CELERY_BROKER_URL=redis://redis:6379/0"
  56. - "CELERY_RESULT_BACKEND=redis://redis:6379/0"
  57. - "REEL2BITS_HOSTNAME=${REEL2BITS_HOSTNAME-localhost}"
  58. - "REEL2BITS_HOSTNAME_SUFFIX=reel2bits.test"
  59. - "REEL2BITS_HOSTNAME_PREFIX=${COMPOSE_PROJECT_NAME}"
  60. - "REEL2BITS_PROTOCOL=${REEL2BITS_PROTOCOL-http}"
  61. depends_on:
  62. - postgres
  63. - redis
  64. networks:
  65. - internal
  66. cap_add:
  67. - SYS_PTRACE
  68. celeryworker:
  69. env_file:
  70. - .env.dev
  71. - .env
  72. build: *backend
  73. depends_on:
  74. - postgres
  75. - redis
  76. command: celery worker -A tasks.celery -l error -B
  77. environment:
  78. - "SQLALCHEMY_DATABASE_URI=postgresql://postgres@postgres/postgres"
  79. - "CELERY_BROKER_URL=redis://redis:6379/0"
  80. - "CELERY_RESULT_BACKEND=redis://redis:6379/0"
  81. - "REEL2BITS_HOSTNAME=${REEL2BITS_HOSTNAME-localhost}"
  82. - "REEL2BITS_HOSTNAME_SUFFIX=reel2bits.test"
  83. - "REEL2BITS_HOSTNAME_PREFIX=${COMPOSE_PROJECT_NAME}"
  84. - "REEL2BITS_PROTOCOL=${REEL2BITS_PROTOCOL-http}"
  85. volumes:
  86. - ./api:/app
  87. - ./data/uploads:/data/uploads
  88. networks:
  89. - internal
  90. nginx:
  91. command: /entrypoint.sh
  92. env_file:
  93. - .env.dev
  94. - .env
  95. image: nginx
  96. ports:
  97. - "8000:80"
  98. environment:
  99. - "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}"
  100. - "COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME- }"
  101. - "REEL2BITS_API_PORT=${REEL2BITS_API_PORT-8000}"
  102. - "REEL2BITS_API_IP=${REEL2BITS_API_IP-api}"
  103. - "REEL2BITS_HOSTNAME=${REEL2BITS_HOSTNAME-localhost}"
  104. depends_on:
  105. - api
  106. - front
  107. volumes:
  108. - ./deploy/docker/nginx/conf.dev:/etc/nginx/nginx.conf.template:ro
  109. - ./deploy/docker/nginx/entrypoint.sh:/entrypoint.sh:ro
  110. - ./deploy/reel2bits_proxy.conf:/etc/nginx/reel2bits_proxy.conf:ro
  111. - ./front/dist:/frontend:ro
  112. - ./data/uploads:/datas/uploads:ro
  113. networks:
  114. - federation
  115. - internal
  116. labels:
  117. traefik.backend: "${COMPOSE_PROJECT_NAME-node1}"
  118. traefik.frontend.rule: "Host:${COMPOSE_PROJECT_NAME-node1}.reel2bits.test,${NODE_IP-127.0.0.1}"
  119. traefik.enable: "true"
  120. traefik.federation.protocol: "http"
  121. traefik.federation.port: "80"
  122. traefik.frontend.passHostHeader: true
  123. traefik.docker.network: federation
  124. docs:
  125. build: docs
  126. command: python serve.py
  127. volumes:
  128. - .:/app/
  129. ports:
  130. - "35730:35730"
  131. - "8001:8001"
  132. networks:
  133. ? internal
  134. federation:
  135. external:
  136. name: federation