To get a local copy of the repository and change into the directory:
git clone git@github.com:fullctl/prefixctl
cd prefixctl
PrefixCtl is containerized with Docker. First we want to copy the example environment file:
cp Ctl/dev/example.env Ctl/dev/.env
Any of the env variables can be changed, and you should set your own secret key.
Specify a DJANGO_PORT
variable in the current shell session, this is the port that the Django server will listen on (defaults to 8000
):
export DJANGO_PORT=8080
You can build / launch the app via:
Ctl/dev/compose.sh up
Open bash in the container:
Ctl/dev/run.sh /bin/sh
Run django commands
Ctl/dev/run.sh {django_command}
The environment file you copied from example.env
contains variables for configuring both the Django and Postgres services- if you change the database name, user, or password, you must ensure the values still match between the Django and Postgres settings. The Django database variables are passed directly into the Django application settings so all five DATABASE_
settings should remain defined.
add USE_LOCAL_PERMISSIONS=1
to the .env file
Then restart the server
Ctl/dev/compose.sh restart
Then run the following command
Ctl/dev/run.sh fullctl_local_setup
This will setup a superuser and organization.
You can proceed to login at http://localhost:8080/admin
with the superuser credentials you just created.
After logging in head to http://localhost:8080
to use PrefixCtl