diff --git a/.gitignore b/.gitignore index 588ece0..07d8e7d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ docker-compose.override.yml .idea/* +.vscode/* data/* code/* \ No newline at end of file diff --git a/backend/Dockerfile.dev b/backend/Dockerfile.dev new file mode 100644 index 0000000..4efdec4 --- /dev/null +++ b/backend/Dockerfile.dev @@ -0,0 +1,8 @@ +# https://hub.docker.com/_/python +FROM python:3.10-slim +WORKDIR /usr/src/app/snypy +COPY /code/snypy-backend/requirements.txt /usr/src/app/snypy/requirements.txt +RUN pip install --no-cache-dir pip gunicorn psycopg2-binary -U +RUN pip install --no-cache-dir -r requirements.txt + +EXPOSE 8000 \ No newline at end of file diff --git a/docker-compose.override.dev.yml b/docker-compose.override.dev.yml index e347551..4345b5a 100644 --- a/docker-compose.override.dev.yml +++ b/docker-compose.override.dev.yml @@ -2,6 +2,10 @@ version: "3" services: api: + image: snypy-dev + build: + context: . + dockerfile: ./backend/Dockerfile.dev environment: DEBUG: "True" ALLOWED_HOSTS: "localhost" @@ -11,6 +15,8 @@ services: REGISTER_VERIFICATION_URL: "http://localhost:4200/verify-user/" RESET_PASSWORD_VERIFICATION_URL: "http://localhost:4200/set-password/?token={token}" REGISTER_EMAIL_VERIFICATION_URL: "http://localhost:4200/verify-email/" + SENTRY_ENABLED: "True" + SENTRY_DSN: "http://changeme@localhost:9000/1" ports: - "8000:8000" volumes: diff --git a/docker-compose.override.example.yml b/docker-compose.override.example.yml index 7593d95..5ba80d0 100644 --- a/docker-compose.override.example.yml +++ b/docker-compose.override.example.yml @@ -12,6 +12,8 @@ services: REGISTER_VERIFICATION_URL: "http://127.0.0.1:8080/verify-user/" RESET_PASSWORD_VERIFICATION_URL: "http://127.0.0.1:8080/set-password/" REGISTER_EMAIL_VERIFICATION_URL: "http://127.0.0.1:8080/verify-email/" + SENTRY_ENABLED: "True" + SENTRY_DSN: "http://changeme@localhost:9000/1" ports: - "8000:8000" volumes: diff --git a/docker-compose.yml b/docker-compose.yml index cf73eff..570064d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,6 +31,7 @@ services: REGISTER_VERIFICATION_URL: "http://localhost:8080/verify-user/" RESET_PASSWORD_VERIFICATION_URL: "http://localhost:8080/set-password/?token={token}" REGISTER_EMAIL_VERIFICATION_URL: "http://localhost:8080/verify-email/" + SENTRY_ENABLED: "False" depends_on: - db