Skip to content

Commit

Permalink
docker: creates db and test consumer key pair
Browse files Browse the repository at this point in the history
- adjusts docker-compose to align with hxat project
  • Loading branch information
nmaekawa committed Apr 18, 2024
1 parent bce125a commit 8051306
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ services:
web:
build: .
image: hx/catchpy:dev
command: ["./wait-for-it.sh", "db:5432", "--", "python", "manage.py", "runserver", "0.0.0.0:8000"]
command: ["./wait-for-it.sh", "db:5432", "--", "./docker_entrypoint.sh"]
volumes:
- .:/code
ports:
- "8000:8000"
- "9000:8000"
depends_on:
- db
environment:
Expand Down
3 changes: 3 additions & 0 deletions docker_dotenv.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ CATCH_RESPONSE_LIMIT=200

# print seach times in steps
CATCH_LOG_SEARCH_TIME="true"

# docker hostname for catchpy
CATCHPY_ALLOWED_HOSTS='catchpy'
6 changes: 6 additions & 0 deletions docker_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
python manage.py migrate
python manage.py create_user --username user --password password --is_admin
python manage.py create_consumer_pair --consumer consumer --secret secret --expire_in_weeks 520 --no-update
python manage.py runserver 0.0.0.0:8000


0 comments on commit 8051306

Please sign in to comment.