Skip to content

Commit

Permalink
Updating for a DockerCompose Dev environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanStoves committed Sep 23, 2024
1 parent 5b9c768 commit dedcf82
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
19 changes: 19 additions & 0 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM python:3.10

ARG ENVIRONMENT=development

RUN useradd --create-home avraeservice
USER avraeservice
WORKDIR /home/avraeservice

COPY --chown=avraeservice:avraeservice requirements.txt .
RUN pip install --user --no-warn-script-location -r requirements.txt

COPY --chown=avraeservice:avraeservice . .

COPY --chown=avraeservice:avraeservice docker/config-${ENVIRONMENT}.py config.py

# Download AWS pubkey to connect to documentDB
RUN wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem

ENTRYPOINT .local/bin/gunicorn --workers 2 --bind 0:8000 app:app
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: Dockerfile-dev
container_name: avrae_io
ports:
- "8000:8080"
environment:
- NODE_ENV=development
4 changes: 2 additions & 2 deletions docker/config-development.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
ENVIRONMENT = "Development"

# Default to `avrae` docker-compose hosts, allow override via environment variables
MONGO_URL = os.getenv("MONGO_URL", "mongodb://root:topsecret@localhost:58017/avrae")
REDIS_URL = os.getenv("REDIS_URL", "redis://redis:58379/0")
MONGO_URL = os.getenv("MONGO_URL", "mongodb://root:topsecret@host.docker.internal:58017/avrae?authSource=admin")
REDIS_URL = os.getenv("REDIS_URL", "redis://host.docker.internal:58379/0")
SENTRY_DSN = os.getenv("SENTRY_DSN")

# discord oauth
Expand Down

0 comments on commit dedcf82

Please sign in to comment.