diff --git a/.deploy-infra/deploy-dev.yaml b/.deploy-infra/deploy-dev.yaml index 0b893b7..1db0504 100644 --- a/.deploy-infra/deploy-dev.yaml +++ b/.deploy-infra/deploy-dev.yaml @@ -6,6 +6,9 @@ services: image: mathwave/sprint-repo:sprint-infra-nginx-dev networks: - common-infra-nginx-development + - configurator + environment: + MINIO_SECRET_KEY: $MINIO_SECRET_KEY_DEV ports: - published: 80 target: 80 @@ -164,3 +167,5 @@ volumes: networks: common-infra-nginx-development: external: true + configurator: + external: true diff --git a/.gitea/workflows/deploy-dev.yaml b/.gitea/workflows/deploy-dev.yaml index 641f677..8489c5a 100644 --- a/.gitea/workflows/deploy-dev.yaml +++ b/.gitea/workflows/deploy-dev.yaml @@ -59,6 +59,7 @@ jobs: MONGO_PASSWORD_DEV: ${{ secrets.MONGO_PASSWORD_DEV }} DB_PASSWORD_DEV: ${{ secrets.POSTGRES_PASSWORD_DEV }} MINIO_PASSWORD_DEV: ${{ secrets.MINIO_PASSWORD_DEV }} + MINIO_SECRET_KEY_DEV: ${{ secrets.MINIO_SECRET_KEY_DEV }} REDIS_PASSWORD_DEV: ${{ secrets.REDIS_PASSWORD_DEV }} RABBITMQ_PASSWORD_DEV: ${{ secrets.RABBITMQ_PASSWORD_DEV }} REGISTRATION_TOKEN: ${{ secrets.REGISTRATION_TOKEN }} diff --git a/nginx/nginx-dev/Dockerfile b/nginx/nginx-dev/Dockerfile index 383c079..57b46a1 100644 --- a/nginx/nginx-dev/Dockerfile +++ b/nginx/nginx-dev/Dockerfile @@ -4,5 +4,6 @@ RUN apt-get install certbot --yes RUN apt-get install python3-certbot-nginx --yes RUN pip3 install requests minio COPY ./config /etc/nginx -COPY run.py run.py -CMD ["python3", "run.py"] \ No newline at end of file +COPY prepare.py prepare.py +COPY run.sh run.sh +CMD ["run.sh"] \ No newline at end of file diff --git a/nginx/nginx-dev/run.py b/nginx/nginx-dev/prepare.py similarity index 95% rename from nginx/nginx-dev/run.py rename to nginx/nginx-dev/prepare.py index 738e460..d6be531 100644 --- a/nginx/nginx-dev/run.py +++ b/nginx/nginx-dev/prepare.py @@ -1,5 +1,4 @@ from requests import get -from subprocess import call import os from minio import Minio @@ -46,6 +45,3 @@ for host in hosts: with open('/etc/nginx/hosts.conf', 'w') as fp: fp.write(config) - - -call('nginx -g daemon off;', shell=True) diff --git a/nginx/nginx-dev/run.sh b/nginx/nginx-dev/run.sh new file mode 100644 index 0000000..ede1e71 --- /dev/null +++ b/nginx/nginx-dev/run.sh @@ -0,0 +1,2 @@ +python3 prepare.py +nginx -g daemon off; \ No newline at end of file