Skip to content

Commit

Permalink
Streamline Docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r committed Sep 4, 2024
1 parent 7acf0e3 commit febf8b9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/deploy/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@

- name: Start Services
shell:
cmd: 'docker compose up -d'
cmd: 'make run'
4 changes: 3 additions & 1 deletion backend/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ RUN groupadd owasp && \
python -m pip install --no-cache-dir poetry && \
rm -rf /var/lib/apt/lists/*

ENV PYTHONUNBUFFERED=1
ENV PYTHONUNBUFFERED=1 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false

EXPOSE 8000

Expand Down
11 changes: 6 additions & 5 deletions backend/Dockerfile.staging
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ RUN groupadd owasp && \
python -m pip install --no-cache-dir poetry && \
rm -rf /var/lib/apt/lists/*

ENV PYTHONUNBUFFERED=1
ENV PYTHONUNBUFFERED=1 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false

WORKDIR /home/owasp

COPY apps apps
COPY manage.py .
COPY poetry.lock .
COPY pyproject.toml .
COPY settings settings
COPY templates templates
COPY wsgi.py wsgi.py
COPY manage.py poetry.lock pyproject.toml wsgi.py ./

RUN poetry install --no-root --without dev --without test

EXPOSE 8000

Expand Down
1 change: 0 additions & 1 deletion docker-compose-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
image: docker.io/arkid15r/owasp-nest-backend:latest
command: >
bash -c '
poetry install --no-root &&
poetry run python manage.py migrate &&
poetry run python manage.py collectstatic --noinput &&
poetry run gunicorn wsgi:application --bind 0.0.0.0:8000
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ services:
container_name: nest-backend
command: >
bash -c '
poetry install --no-root &&
poetry run python manage.py migrate &&
poetry run python manage.py runserver 0.0.0.0:8000
'
Expand Down

0 comments on commit febf8b9

Please sign in to comment.