version: '3.8' services: nginx: image: nginx:latest depends_on: - backend - celery-worker restart: always command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf # - static_volume:/app/tkets/staticfiles # - media_volume:/app/tkets/mediafiles - ./data/certbot/conf:/etc/letsencrypt - ./data/certbot/www:/var/www/certbot - ./log/nginx:/var/log/nginx # - ./nginx/remote-app:/etc/nginx/sites-enabled/remote-app # - /etc/nginx/proxy_params:/etc/nginx/proxy_params ports: - 80:80 - 143:143 - 443:443 backend: build: . ports: - "5000:5000" command: ["gunicorn", "--bind", "[::]:5000", "--workers", "8", "wsgi:app"] # command: ["python3.9", "--version"] restart: always # volumes: # - ./solbolt/:/app/solbolt/ # - static_volume:/app/solbolt/staticfiles # - media_volume:/app/solbolt/mediafiles # depends_on: # - ipfs env_file: - backend.env celery-worker: build: . command: ["celery", "-A", "solbolt.tasks", "worker", "-l", "info", "--concurrency=2"] # command: ["python3", "manage.py", "runserver", "[::]:5000"] restart: always user: appuser # volumes: # - ./solbolt/:/app/solbolt/ # - static_volume:/solbolt/tkets/staticfiles # - media_volume:/solbolt/tkets/mediafiles depends_on: - redis env_file: - backend.env redis: image: redis:6.2.6-alpine command: > --requirepass ${DOCKER_REDIS_PASSWORD} restart: always ports: - "6379:6379" certbot: image: certbot/certbot entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" restart: always volumes: - ./data/certbot/conf:/etc/letsencrypt - ./data/certbot/www:/var/www/certbot # volumes: # static_volume: # media_volume: