Commit 1379563b by Chif Gergő

set settings module based on which dockerfile runs

parent fcf5abcf
Pipeline #1279 passed with stages
in 4 minutes 41 seconds
...@@ -38,6 +38,7 @@ deploy_staging: ...@@ -38,6 +38,7 @@ deploy_staging:
git checkout DEV && git checkout DEV &&
git submodule update --init --recursive && git submodule update --init --recursive &&
chmod +x ./setup_ci_env.sh && ./setup_ci_env.sh && chmod +x ./setup_ci_env.sh && ./setup_ci_env.sh &&
echo DJANGO_SETTINGS_MODULE=recircle.settings.prod >> .env &&
docker-compose -f docker-compose.prod.yml up -d --build && docker-compose -f docker-compose.prod.yml up -d --build &&
exit exit
environment: environment:
......
...@@ -9,6 +9,7 @@ EXPOSE 8000/tcp ...@@ -9,6 +9,7 @@ EXPOSE 8000/tcp
COPY Pipfile* .env ./ COPY Pipfile* .env ./
# This env variable needed to pipenv find .env file # This env variable needed to pipenv find .env file
ENV PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env ENV PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env
ENV DJANGO_SETTINGS_MODULE=recircle.settings.local
# Install dependencies # Install dependencies
RUN pipenv install -d RUN pipenv install -d
# Copy sources # Copy sources
......
...@@ -9,6 +9,7 @@ EXPOSE 8000/tcp ...@@ -9,6 +9,7 @@ EXPOSE 8000/tcp
COPY Pipfile* .env ./ COPY Pipfile* .env ./
# This env variable needed to pipenv find .env file # This env variable needed to pipenv find .env file
ENV PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env ENV PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env
ENV DJANGO_SETTINGS_MODULE=recircle.settings.prod
# Install dependencies # Install dependencies
RUN pipenv install RUN pipenv install
# Copy sources # Copy sources
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
# And by the Django runtime # And by the Django runtime
# Django configuration # Django configuration
echo DJANGO_SECRET=${DJANGO_SECRET} >> .env echo DJANGO_SECRET=${DJANGO_SECRET} >> .env
echo DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE} >> .env
# If using other database than sqlite3 (only use sqlite for development!) # If using other database than sqlite3 (only use sqlite for development!)
# Provide the db credentials here # Provide the db credentials here
echo DATABASE_PASSWORD=${DATABASE_PASSWORD} >> .env echo DATABASE_PASSWORD=${DATABASE_PASSWORD} >> .env
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment