Django based custom web application for food collective www.vokoutrecht.nl.
This project includes automated deployment workflows:
- Test environment: Automatically deploys when pushing to
main
branch - Production environment: Manual deployment via GitHub Actions workflow dispatch
For complete deployment setup instructions, see docs/DEPLOYMENT.md.
- The code base needs cleaning up and adding of tests.
- License: GNU GPLv3
- Use at your own risk, no support.
Option 1: Using make (if you have make installed)
git clone https://github.com/VOKO-Utrecht/voko.git
cd voko
make setup
Option 2: Using docker-compose directly
git clone https://github.com/VOKO-Utrecht/voko.git
cd voko
docker-compose up
Then:
4. Wait for the setup to complete (you'll see "Starting development server...")
5. Go to: http://127.0.0.1:8000
6. Login with: [email protected]
/ admin123
That's it! The setup automatically:
- Creates and initializes the database
- Runs all migrations
- Creates a superuser account if it does not exist
- Starts the development server
You can also visit the main site at: http://127.0.0.1:8000/
If you have make installed, you can use these convenient commands:
make setup
- Complete setup (build and start)make up
- Start servicesmake down
- Stop servicesmake logs
- View logsmake shell
- Access Django shellmake test
- Run testsmake validate
- Check if setup is workingmake reset
- Reset database (deletes all data)make help
- Show all available commands
You can customize the automatically created superuser by setting environment variables:
DJANGO_SUPERUSER_EMAIL
(default: [email protected])DJANGO_SUPERUSER_FIRST_NAME
(default: Admin)DJANGO_SUPERUSER_LAST_NAME
(default: User)DJANGO_SUPERUSER_PASSWORD
(default: admin123)
For convenience, you can copy .env.example
to .env
and modify the values there:
cp .env.example .env
# Edit .env file with your preferred values
Or set them directly when starting:
[email protected] DJANGO_SUPERUSER_PASSWORD=mypassword docker-compose up
- If you get database connection errors, make sure the database is fully started by running
docker-compose up db
first, waiting for it to be ready, then stopping it and runningdocker-compose up
again. - If you need to reset the database, run:
docker-compose down -v
(this will delete all data) - To access the Django shell:
docker exec -it voko_web bash
then./manage.py shell --settings=vokou.settings.development
- To view logs:
docker-compose logs web
ordocker-compose logs db
- To validate your setup is working:
./validate_setup.sh
This improved Docker setup includes:
- Automated superuser creation: No need to manually create admin accounts
- Automatic sample data creation: Creates a sample supplier and order round
- One-command setup: Just run
docker-compose up
ormake setup
- Health checks: Ensures database is ready before starting the web server
- Validation script: Check if everything is working correctly
- Convenient Make commands: Easy-to-use shortcuts for common tasks
- Environment variable support: Customize superuser credentials and other settings
- Better error handling: More robust startup process
- Run: pip install --user uv
- Run:
git clone https://github.com/VOKO-Utrecht/voko.git
- Run:
cd voko
- Sync environment:
uv sync --dev
- Active environment:
source .venv/bin/activate
python manage.py makemigrations --settings=vokou.settings.development
python manage.py migrate --settings=vokou.settings.development
python manage.py createsuperuser --settings=vokou.settings.development
python manage.py runcrons --force --settings=vokou.settings.development
python manage.py test --settings=vokou.settings.testing
python manage.py runserver --settings=vokou.settings.development
- Register as new user at: http://localhost:8000/accounts/register/
- Look up the confirmation token at: http://localhost:8000/admin/accounts/emailconfirmation/
- Visit (replace TOKEN with copied token): http://localhost:8000/accounts/register/confirm/TOKEN
- Log in as superuser and go to user admin: http://localhost:8000/admin/accounts/vokouser/
- Select your user, choose in dropdown: "Gebruikersactivatie na bezoek info-avond", click "Uitvoeren" button
- Log out as superuser, or visit the next link incognito (replace TOKEN with copied token): http://localhost:8000/accounts/register/finish/TOKEN
- Fill in fields and submit
- Go to http://localhost:8000/admin/accounts/vokouser/
- Select user
- Choose in dropdown: "Anonimiseer account"
- Click "Uitvoeren" button
- Go to http://localhost:8000/admin/accounts/sleepingvokouser/
- Open user
- De-tick "Sleeping (inactive) member"
- click "OPSLAAN" button