Skip to content

Commit

Permalink
Update the usage_scenario to create our setup for running scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed May 16, 2024
1 parent d713092 commit 4ddbc36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt-get clean
# Delete index files we don't need anymore:
RUN rm -rf /var/lib/apt/lists/*

# Install dependencies in a virtualenv
# Declare the path for our virtual environment
ENV VIRTUAL_ENV=/app/.venv

# RUN useradd deploy --create-home && mkdir /app /app/.venv && chown -R deploy /app /app/.venv
Expand All @@ -39,7 +39,7 @@ EXPOSE 9000
USER deploy

# Set up our virtual env directory
RUN python -m venv /app/.venv
RUN python -m venv $VIRTUAL_ENV

# Add our python libraries for managing dependencies
# uv 0.1.43 is triggering bad certificate errors, so we pin to 0.1.39
Expand Down
15 changes: 7 additions & 8 deletions usage_scenario.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ services:
depends_on:
- mariadb
- rabbitmq
# if we have the greenweb-app container built, commenting out the lines below
# means we can use the image we've already built rather than needing to take a
# few minutes each time to build it fresh again
build:
context: .
dockerfile: Dockerfile
# command: "gunicorn greenweb.wsgi --bind $GUNICORN_BIND_IP:$PORT --config gunicorn.conf.py $GUNICORN_CMD_ARGS"
environment:
- VIRTUAL_ENV=/app/.venv
- PYTHONPATH=/app
- PATH=/app/.venv/bin:$PATH
- PORT=9000
- GUNICORN_BIND_IP=0.0.0.0
- PYTHONDONTWRITEBYTECODE=1
Expand All @@ -57,11 +56,11 @@ services:
- DJANGO_SETTINGS_MODULE=greenweb.settings.development
ports:
- 9000:9000
expose:
- 9000
# uncomment this be able to send requests to the django container
# from outside the docker network
# expose:
# - 9000
# restart: on-failure
volumes:
- .:/app
stdin_open: true
log-stdout: true
log-stderr: true
Expand Down

0 comments on commit 4ddbc36

Please sign in to comment.