Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix(image): use port 8080
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Apr 12, 2024
1 parent 37a4b52 commit 9613843
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV DJANGO_SETTINGS_MODULE=timed.settings \
STATIC_ROOT=/var/www/static \
HURRICANE_REQ_QUEUE_LEN=200

EXPOSE 80
EXPOSE 8080

FROM base AS build

Expand Down Expand Up @@ -40,9 +40,10 @@ FROM build as dev

WORKDIR /app

RUN apk update --no-cache && apk add wait4ports --no-cache

RUN apk add gcc python3-dev musl-dev linux-headers && poetry config virtualenvs.create false && poetry install && apk del gcc python3-dev musl-dev linux-headers --no-cache
RUN apk update --no-cache && \
apk add gcc python3-dev musl-dev linux-headers wait4ports && \
poetry config virtualenvs.create false && poetry install && \
apk del gcc python3-dev musl-dev linux-headers --no-cache

USER 1001

Expand All @@ -54,7 +55,9 @@ COPY --from=build-prod /tmp/*.whl /tmp/

COPY cmd.sh /usr/local/bin

RUN apk add gcc python3-dev musl-dev linux-headers --no-cache && pip install /tmp/*.whl --no-cache-dir && rm /tmp/*.whl && apk del gcc python3-dev musl-dev linux-headers --no-cache
RUN apk add gcc python3-dev musl-dev linux-headers --no-cache && \
pip install /tmp/*.whl --no-cache-dir && rm /tmp/*.whl && \
apk del gcc python3-dev musl-dev linux-headers --no-cache

USER 1001

Expand Down
2 changes: 1 addition & 1 deletion cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ manage.py collectstatic --noinput
set -e

manage.py migrate --no-input
manage.py serve --static --port 80 --req-queue-len "${HURRICANE_REQ_QUEUE_LEN:-250}" "$@"
manage.py serve --static --port 8080 --req-queue-len "${HURRICANE_REQ_QUEUE_LEN:-250}" "$@"
2 changes: 1 addition & 1 deletion compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
volumes:
- ./:/app
ports:
- "81:81"
- "8081:8081"
networks:
- timed.local

Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
backend:
build: .
ports:
- 8000:80
- 8000:8080
depends_on:
- db
environment:
Expand Down

0 comments on commit 9613843

Please sign in to comment.