add testdata to docker setup. use sqlite in 'dev' scenario and mailpit in 'testing'
All checks were successful
/ test (push) Successful in 2m44s
/ deploy (push) Successful in 3m33s

This commit is contained in:
j3d1 2024-12-22 21:00:28 +01:00
parent c512da2660
commit ed7186cbbd
5 changed files with 126 additions and 34 deletions

View file

@ -20,7 +20,7 @@ services:
build:
context: ../../core
dockerfile: ../deploy/testing/Dockerfile.backend
command: bash -c 'python manage.py migrate && python /code/server.py'
command: bash -c 'python manage.py migrate && python testdata.py && python /code/server.py'
environment:
- HTTP_HOST=core
- REDIS_HOST=redis
@ -29,13 +29,16 @@ services:
- DB_NAME=system3
- DB_USER=system3
- DB_PASSWORD=system3
- MAIL_DOMAIN=mail:1025
volumes:
- ../../core:/code
- ../testdata.py:/code/testdata.py
ports:
- "8000:8000"
depends_on:
- db
- redis
- mail
frontend:
build:
@ -51,5 +54,19 @@ services:
depends_on:
- core
mail:
image: docker.io/axllent/mailpit
volumes:
- mailpit_data:/data
ports:
- 8025:8025
- 1025:1025
environment:
MP_MAX_MESSAGES: 5000
MP_DATABASE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
volumes:
mariadb_data:
mariadb_data:
mailpit_data: