This repository contains the Docker setup for Open Source Social Network (OSSN), enabling you to quickly build and run OSSN in containers.
- Docker installed (Get Docker)
- Docker Compose installed (Get Docker Compose)
git clone https://github.com/opensource-socialnetwork/docker.git
cd docker
This will build the web container and start both web and database containers.
docker-compose up --build -d
Make sure port 80 allowed by ufw
sudo ufw allow 80/tcp
sudo ufw reload
- The OSSN web app will be available at
http://localhost
(or your server IP) or visit FQDN that points to your server IP example http://yourwebsite.com/ - MySQL database is preconfigured for OSSN with environment variables set in
docker-compose.yml
- Follow the instructions and leave the pre-filled fields unchanged.
docker-compose down
This stops and removes containers but does not remove data volumes.
To remove containers and persistent data (database and OSSN files), run:
docker-compose down -v
⚠️ Warning: This deletes all your OSSN data!
To enter the web container shell for debugging or file edits:
docker-compose exec web /bin/bash
- View logs
docker-compose logs -f
- Rebuild container after Dockerfile changes
or without cached
docker-compose build web
docker-compose build --no-cache
- Restart containers
docker-compose restart
- The database hostname for OSSN is
db
(matching service name in Docker Compose). - Persistent data is stored in Docker volumes (
db_data
for MySQL,ossn_data
for OSSN files). - To enable HTTPS, additional Apache configuration and SSL certificates are needed.
- If you encounter database connection errors, ensure containers are running and OSSN connects using hostname
db
. - For clean installs, remove volumes with
docker-compose down -v
to reset data. - Check logs for errors:
docker-compose logs -f
Happy Open Source Social Networking! 🎉