This reposity is unmaintained because of the new management api. It completely replaces the card-deck-server and therefore makes it useless.
The deck server can be started quite easily using docker. The docker image can be get from the GitHub packages of the Cardsity organization.
To pull the latest image, type: docker pull docker.pkg.github.com/cardsity/card-deck-server/cardsity-deck-server:latest
.
Note: To pull this image, you need to authenticate to GitHub packages.
The image can then be run. It will expose the port 8020
.
- SECRET_KEY: The django secret key. Choose a long, randomly generated password for this.
- ALLOWED_HOSTS: A list of allowed hosts separated by
,
, e.g.:127.0.0.1,localhost
- DATABASE_URL: The database url. For more information, see the
db_url
type of django-environ. You can also set theMYSQL_USERNAME
,MYSQL_PASSWORD
,MYSQL_HOST
andMYSQL_DATABASE
vars (this requires that noDATABASE_URL
is supplied). If theMYSQL_*
parameters are supplied, the container will automatically build the database url itself. - DJANGO_AUTOMATIC_MIGRATE: If this environment variable is set, django will automatically migrate the database on every start.
- DJANGO_COLLECTSTATIC: If this environment variable is set, django will automatically collect the static files on every start.
- SLEEP: If this parameter is supplied, the script will sleep for the supplied amount at the beginning.
To create a superuser, all of this three environment variables have to be supplied:
- DJANGO_SUPERUSER_USERNAME: The username
- DJANGO_SUPERUSER_EMAIL: The email
- DJANGO_SUPERUSER_PASSWORD: The password
The application itself gives the option to use multiple configurations for the settings. Here is a comparison of them:
dev | prod | |
---|---|---|
Module | carddeckserver.settings.dev | carddeckserver.settings.prod |
django-debug-toolbar | ✔️ | ❌ |
Secret key | Fixed secret key | Loaded from environment |
Debug | ✔️ | ❌ |
Database | db.sqlite3 in project root | Uses the database from the environment variable |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.