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

fix(image): use port 8080 #1024

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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