- Shell 94.7%
- Dockerfile 5.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| compose.yml | ||
| Dockerfile | ||
| example.env | ||
| README.md | ||
| setup.sh | ||
HaDiKino Docker Setup
HaDiKino was the website of BarK3 at HaDiKo, once live at hadikino.hadiko.de (now offline). During the corona pandemic it helped keep the BarK3 cinema running online — with film posts, ticket widgets, and the usual WordPress admin behind it.
This repository lets you spin up a dockerized local copy of that old site from your own backup. Useful for nostalgia, debugging, or recovering data from the archive.
The backup itself is not included in this repo. You need your own hadikino.tar.gz
and place it in the project root before running setup.
Prerequisites
- Docker and Docker Compose
sudo(used for extracting the archive, writing intomariadb/, and updatingwp-config.php)- Your backup file:
hadikino.tar.gz
Quick start
-
Clone this repository.
-
Copy your backup into the project root:
cp /path/to/your/hadikino.tar.gz . -
Run the setup script:
./setup.sh -
Open the site:
- Site: http://localhost:8099/
- Admin: http://localhost:8099/wp-admin/
The default port is 8099. Change it in .env via HADIKINO_PORT if needed.
What setup.sh does
The script walks you through the full setup:
-
Extract the backup
- Looks for
hadikino.tar.gzin the project root. - Extracts it into
./wordpress-hadikino/(preserving numeric UID/GID from the archive). - If
wordpress-hadikino/already exists, asks whether to delete and re-extract.
- Looks for
-
Create
.env- Copies
example.envto.env(or keeps an existing.envif you choose). - Reads database name, user, and password from
wordpress-hadikino/wp-config.php. - Asks for a MariaDB root password (press Enter to use the default
your_root_password_here).
- Copies
-
Configure WordPress for Docker
- Sets
DB_HOSTtodatabase(the Docker Compose service name). - Adds or updates
WP_HOMEandWP_SITEURLforhttp://localhost:8099so the site works locally instead of redirecting tohadikino.hadiko.de. - Sets permissions on
wp-content/for the web server user in the container.
- Sets
-
Start MariaDB
- Pulls and starts the
databasecontainer. - If
./mariadb/already exists, asks whether to wipe it and start fresh.
- Pulls and starts the
-
Import the SQL dump
- Loads
wordpress-hadikino/2026-07-17-hadikino.sqlinto MariaDB. - Drops and recreates the database first, so the dump is the only source of data.
- Grants the app user access from any host inside Docker (
%).
- Loads
-
Reset the admin password
- Shows administrator username and email from the imported database.
- Asks for a new admin password (leave empty to keep the one from the backup).
- Updates all administrator accounts using WordPress's phpass hash format.
-
Build and start the app
- Builds the
hadikinoPHP/Apache image fromDockerfile. - Starts the app container on port
8099.
- Builds the
Prompts during setup
| Question | Typical answer |
|---|---|
Delete existing wordpress-hadikino/ and re-extract? |
y on first run, n later |
Overwrite .env from example.env? |
y on first run, n if you already configured it |
| MariaDB root password | Enter a password, or leave empty for the default |
| Wipe existing MariaDB data? | y if you want a clean database import |
| New admin password | Enter a new password, or leave empty to keep the backup password |
| Confirm admin password | Re-enter the new password |
Project layout
.
├── compose.yml # Docker Compose services (database + hadikino)
├── Dockerfile # PHP 7.4 + Apache image for WordPress
├── example.env # Template for environment variables
├── setup.sh # Main setup script
├── hadikino.tar.gz # Your backup (not in git — you provide this)
├── wordpress-hadikino/ # Extracted WordPress site (not in git)
├── mariadb/ # MariaDB data volume (not in git)
└── .env # Local config (not in git)
Useful commands after setup
# View logs
docker compose logs -f
# Stop everything
docker compose down
# Start again (without re-running setup)
docker compose up -d
# Rebuild app image after Dockerfile changes
docker compose build hadikino
docker compose up -d hadikino
Re-running setup
You can run ./setup.sh again at any time. It will ask before overwriting or deleting
anything important (wordpress-hadikino/, .env, mariadb/).
To fully reset the database and re-import the dump, answer y when asked to wipe
existing MariaDB data.
Notes
- The SQL dump filename is currently fixed to
wordpress-hadikino/2026-07-17-hadikino.sql. If your backup uses a different dump name, rename it or adjustsetup.sh. - Database credentials for Docker are taken from
wp-config.phpand written into.env. The app inside the container connects to hostnamedatabase, notlocalhost. WP_HOMEandWP_SITEURLinwp-config.phpoverride the URLs stored in the database. Comment them out or remove them if you deploy this copy back to a live server.hadikino.tar.gz,wordpress-hadikino/,mariadb/, and.envare gitignored and must be created locally.