- Shell 94.7%
- Dockerfile 5.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .dockerignore | ||
| .gitignore | ||
| compose.yml | ||
| Dockerfile | ||
| example.env | ||
| README.md | ||
| setup.sh | ||
HaDiDate Docker Setup
HaDiDate was an April Fool's joke 2016 for HaDiKo, once live at hadidate.hadiko.de (now offline). Behind the joke sat a real pH7CMS dating-site installation — complete with users, messages, and admin panel.
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 hadidate.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 updating app config files)- Your backup file:
hadidate.tar.gz
Quick start
-
Clone this repository.
-
Copy your backup into the project root:
cp /path/to/your/hadidate.tar.gz . -
Run the setup script:
./setup.sh -
Open the app:
The default port is 8099. Change it in .env via HADIDATE_PORT if needed.
What setup.sh does
The script walks you through the full setup:
-
Extract the backup
- Looks for
hadidate.tar.gzin the project root. - Extracts it into
./hadidate/(preserving numeric UID/GID from the archive). - If
hadidate/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
hadidate/_protected/app/configs/config.ini. - Asks for a MariaDB root password (press Enter to use the default
your_root_password_here).
- Copies
-
Configure the app for Docker
- Sets database hostname to
database(the Docker Compose service name). - Adjusts cookie/session domains for local access.
- Fixes the protected path in
_constants.php. - Clears stale cache and sets permissions for the web server user in the container.
- Sets database hostname to
-
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
hadidate/2026-07-17-hadidate.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 admin username, email, and name from the imported database.
- Asks for a new admin password (leave empty to keep the one from the backup).
- Updates the password in
PH7_adminsusing the same bcrypt format as the app.
-
Build and start the app
- Builds the
hadidatePHP/Apache image fromDockerfile. - Starts the app container on port
8099.
- Builds the
Prompts during setup
| Question | Typical answer |
|---|---|
Delete existing hadidate/ 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 + hadidate)
├── Dockerfile # PHP 7.4 + Apache image for the app
├── example.env # Template for environment variables
├── setup.sh # Main setup script
├── hadidate.tar.gz # Your backup (not in git — you provide this)
├── hadidate/ # Extracted app (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 hadidate
docker compose up -d hadidate
Re-running setup
You can run ./setup.sh again at any time. It will ask before overwriting or deleting
anything important (hadidate/, .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
hadidate/2026-07-17-hadidate.sql. If your backup uses a different dump name, rename it or adjustsetup.sh. - Database credentials for Docker are taken from
config.iniand written into.env. The app inside the container connects to hostnamedatabase, notlocalhost. hadidate.tar.gz,hadidate/,mariadb/, and.envare gitignored and must be created locally.