diff --git a/config/nginx/server.conf b/config/nginx/server.conf new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose-pro.yml b/docker-compose-pro.yml new file mode 100644 index 0000000..6502f95 --- /dev/null +++ b/docker-compose-pro.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:8080" + volumes: + - ./config/nginx/local.conf:/etc/nginx/conf.d/default.conf:ro + - static_volume:/django_static + depends_on: + - django + +volumes: + dbdata: + static_volume: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 6502f95..901197a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: nginx: image: nginx ports: - - "80:8080" + - "1337:8080" volumes: - ./config/nginx/local.conf:/etc/nginx/conf.d/default.conf:ro - static_volume:/django_static