Skip to content

Commit

Permalink
Fix typo in final Dockerfile line
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed May 15, 2024
1 parent 9feac41 commit d713092
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

# Install dependencies in a virtualenv
# ENV VIRTUAL_ENV=/app/.venv
ENV VIRTUAL_ENV=/app/.venv

RUN useradd deploy --create-home && mkdir /app /app/.venv && chown -R deploy /app /app/.venv
# RUN useradd deploy --create-home && mkdir /app $VIRTUAL_ENV && chown -R deploy /app $VIRTUAL_ENV
# RUN useradd deploy --create-home && mkdir /app /app/.venv && chown -R deploy /app /app/.venv
RUN useradd deploy --create-home && mkdir /app $VIRTUAL_ENV && chown -R deploy /app $VIRTUAL_ENV

WORKDIR /app

# Adding the virtual environment to the path saves us needing to
# run `source /app/.venv/bin/activate`, and adding python path
# makes it easier to run manage.py commands
# ENV PATH=$VIRTUAL_ENV/bin:$PATH \
# PYTHONPATH=/app
ENV PATH=$VIRTUAL_ENV/bin:$PATH \
PYTHONPATH=/app

# Default port exposed by this container
EXPOSE 9000
Expand All @@ -49,8 +49,8 @@ RUN python -m pip install uv==0.1.39 wheel --upgrade
# from our final build artefact
COPY --chown=deploy . .

# Install dependencies via uv
RUN uv pip install -r requirements/requirements.linux.generated.txt
# Install dependencies via uv into /app/.venv/
RUN python -m pip install -r requirements/requirements.linux.generated.txt

# Set up front end pipeline
RUN python ./manage.py tailwind install
Expand All @@ -70,4 +70,6 @@ RUN python ./manage.py collectstatic --noinput --clear
# Use the shell form of CMD, so we have access to our environment variables
# $GUNICORN_CMD_ARGS allows us to add additional arguments to the gunicorn command

CMD /bin/sh /app/.venv/bin/gunicorn greenweb.wsgi --bind $GUNICORN_BIND_IP:$PORT --config gunicorn.conf.py $GUNICORN_CMD_ARGS


CMD /app/.venv/bin/gunicorn greenweb.wsgi --bind $GUNICORN_BIND_IP:$PORT --config gunicorn.conf.py $GUNICORN_CMD_ARGS

0 comments on commit d713092

Please sign in to comment.