[...put project description here...]
This project uses "djangle" template for developing & deployment. See instructions below.
Djangle is a template which simplifies development & deployment of django apps. It's based on docker & docker compose.
This covers case when you want to start completely new project and don't have any code yet.
First, create a project folder and init git repo:
mkdir new_project && cd new_project
git init
git config user.name "your name"
git config user.email "your email"Then, set up djangle as one of remotes, and pull latest version. This will create a branch named djangle/template which is a skeleton for any new project:
git remote add djangle git@github.com:0xE111/djangle.git
git fetch --allNow you have a djangle/template branch which contains latest djangle configuration and which you may use to generate project structure. Your master branch is still empty, let's populate if from djangle/template branch:
git merge djangle/templateAlmost done! Install dependencies:
uv syncNow you should be able to start development. Launch containers in foreground:
# run from project root folder; may require sudo
docker-compose up redis nats postgresSwitch to another terminal and run dev Django server:
uv run src/manage.py migrate
uv run src/manage.py runserverVisit http://127.0.0.1:8000 and ensure that you may see greetings page.
# on server
apt-get update && apt-get upgrade
apt-get install fish docker-compose git rsync
chsh -s /usr/bin/fish
NAME=project
mkdir $NAME && cd $NAME
git init
git config receive.denyCurrentBranch updateInstead...
# on server
nano .git/hooks/post-receive
# ---
#!/bin/sh -eux
cd /root/project
sh bin/deploy.sh
# ---
chmod +x .git/hooks/post-receivegit fetch djangle
git merge djangle/templateChange all values in
.envrccarefully on production server.
bin/django-manage.sh command \"arg with space\"- nox