This guide provides instructions for running Froxlor in Docker containers, including both basic Docker commands and Docker Compose configurations.
See Docker installation: Docker
Run Froxlor with a simple Docker command:
docker run --rm -it froxlor:latest --help
For a quick test run:
docker run -d \
--name froxlor \
-p 8080:80 \
-e MYSQL_ROOT_PASSWORD=your_secure_password \
-e FROXLOR_DB_HOST=host.docker.internal \
-e FROXLOR_DB_USER=froxlor \
-e FROXLOR_DB_PASS=your_froxlor_password \
-e FROXLOR_DB_NAME=froxlor \
froxlor/froxlor:latest
For more advanced configurations and easier management, use Docker Compose. Create a docker-compose.yml file with the following content:
version: '3.8'
services:
froxlor:
image: froxlor/froxlor:latest
container_name: froxlor
ports:
- "8080:80"
- "443:443"
volumes:
- ./data:/var/www/froxlor
- ./logs:/var/log/apache2
environment:
- MYSQL_ROOT_PASSWORD=your_secure_root_password
- FROXLOR_DB_HOST=mysql
- FROXLOR_DB_USER=froxlor
- FROXLOR_DB_PASS=your_froxlor_db_password
- FROXLOR_DB_NAME=froxlor
depends_on:
- mysql
restart: unless-stopped
mysql:
image: mysql:8.0
container_name: froxlor-mysql
environment:
- MYSQL_ROOT_PASSWORD=your_secure_root_password
- MYSQL_DATABASE=froxlor
- MYSQL_USER=froxlor
- MYSQL_PASSWORD=your_froxlor_db_password
volumes:
- froxlor_mysql_data:/var/lib/mysql
restart: unless-stopped
volumes:
froxlor_mysql_data:
For more customization options, use this enhanced configuration:
version: '3.8'
services:
froxlor:
image: froxlor/froxlor:latest
container_name: froxlor
ports:
- "8080:80"
- "443:443"
volumes:
- ./data:/var/www/froxlor
- ./logs:/var/log/apache2
- ./config:/etc/apache2/sites-available
environment:
- MYSQL_ROOT_PASSWORD=your_secure_root_password
- FROXLOR_DB_HOST=mysql
- FROXLOR_DB_USER=froxlor
- FROXLOR_DB_PASS=your_froxlor_db_password
- FROXLOR_DB_NAME=froxlor
depends_on:
- mysql
restart: unless-stopped
mysql:
image: mysql:8.0
container_name: froxlor-mysql
environment:
- MYSQL_ROOT_PASSWORD=your_secure_root_password
- MYSQL_DATABASE=froxlor
- MYSQL_USER=froxlor
- MYSQL_PASSWORD=your_froxlor_db_password
volumes:
- froxlor_mysql_data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
restart: unless-stopped
volumes:
froxlor_mysql_data:
For production environments, consider using a reverse proxy with SSL:
version: '3.8'
services:
nginx-proxy:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./ssl:/etc/nginx/ssl
restart: unless-stopped
froxlor:
image: froxlor/froxlor:latest
container_name: froxlor
expose:
- "80"
- "443"
volumes:
- ./data:/var/www/froxlor
- ./logs:/var/log/apache2
environment:
- MYSQL_ROOT_PASSWORD=your_secure_root_password
- FROXLOR_DB_HOST=mysql
- FROXLOR_DB_USER=froxlor
- FROXLOR_DB_PASS=your_froxlor_db_password
- FROXLOR_DB_NAME=froxlor
depends_on:
- mysql
restart: unless-stopped
mysql:
image: mysql:8.0
container_name: froxlor-mysql
environment:
- MYSQL_ROOT_PASSWORD=your_secure_root_password
- MYSQL_DATABASE=froxlor
- MYSQL_USER=froxlor
- MYSQL_PASSWORD=your_froxlor_db_password
volumes:
- froxlor_mysql_data:/var/lib/mysql
restart: unless-stopped
volumes:
froxlor_mysql_data:
docker-compose.yml file in your project directorydocker-compose up -d
http://localhost:8080 (or your server IP)docker-compose up -ddocker-compose downdocker-compose logs -f froxlordocker-compose pull && docker-compose up -dDeploying Froxlor in containers for production? Our consulting covers:
Get expert help: office@linux-server-admin.com | Contact Page