A minimalist platform for hosting webcomics. Gives a nice browsing experience due to AJAX navigation.
This minimal webcomics platform is available under the terms of the permissive MIT license. While not required, if you do something interesting with the code, please drop us a line; we'd love to know what you're up to!
Want to run a comics server for yourself? Maybe you'd rather send us a bug fix or new feature? Get started here.
If you're unfamiliar with Docker, this might be a little tricky for you. It's worth learning though; power through it until you understand!
python generate_env.py
to set up the docker environment configuration. Answer y
to the prompt if you're doing development work, or n
if you're deploying a server.docker compose up --build -d
You now have a server running. Unfortunately it doesn't do much - we need to initialize the data or restore from a backup.
docker compose exec django bash
python manage.py migrate
python manage.py createsuperuser
. Follow the prompts.python manage.py collectstatic
http://localhost
. (Note that this is running on port 80 unlike many development servers.)localhost
as its "domain" so the URL router knows where to find it.To back up your database, run docker compose exec django python manage.py backup dump <your filename here>.zip
.
To restore your database from a backup zip:
docker-compose exec django python manage.py backup load <your filename here>.zip
.The caddy server will automatically generate certs for the domain set in project.env
Here's a rough outline of what I did to get this server deployed on a fresh Ubuntu AWS EC2 instance.
# Apply security updates
sudo apt update
sudo apt upgrade
# Get Docker
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce
# Get Docker Compose
mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
# Make it so we don't have to use docker with sudo
sudo usermod -aG docker ${USER}
newgrp docker
# Get the project
git clone https://github.com/pennomi/comics.git
cd comics
# HEADS UP! First remember to set your DNS to the public IP address of the server
python3 generate_env.py # Select "n" because this is a production environment
docker compose build
# Start the server
docker compose up --build -d
# Create the database and initialize the static files
docker compose exec django python manage.py migrate
docker compose exec django python manage.py collectstatic
# EITHER initialize the data
docker compose exec django python manage.py createsuperuser
# OR load from a data dump
docker compose exec django python manage.py backup load <dumpfile.zip>
# Restart the server
docker compose restart