diff --git a/config/nginx/local.conf b/config/nginx/server-cloudflare.conf similarity index 95% rename from config/nginx/local.conf rename to config/nginx/server-cloudflare.conf index 236ab6c..35ffb82 100644 --- a/config/nginx/local.conf +++ b/config/nginx/server-cloudflare.conf @@ -3,7 +3,7 @@ upstream django_server{ } server{ - listen 8080; + listen 80; server_name localhost; location / { diff --git a/docker-compose-cloudflare.yml b/docker-compose-cloudflare.yml new file mode 100644 index 0000000..9268581 --- /dev/null +++ b/docker-compose-cloudflare.yml @@ -0,0 +1,40 @@ +version: "3.9" + +services: + db: + image: postgres + volumes: + - dbdata:/var/lib/postgresql/data + env_file: + - config/db/databasepostgresql_env + + rabbitmq: + image: rabbitmq + + django: + restart: always + environment: + - DJANGO_SETTINGS_MODULE=config.settings.production + build: . + command: gunicorn --chdir src --bind 0.0.0.0:8000 config.wsgi + ports: + - "8000:8000" + depends_on: + - db + - rabbitmq + volumes: + - static_volume:/django_static + + nginx: + image: nginx + ports: + - "80:80" + volumes: + - ./config/nginx/server-cloudflare.conf:/etc/nginx/conf.d/default.conf:ro + - static_volume:/django_static + depends_on: + - django + +volumes: + dbdata: + static_volume: