Install Faridoon with Docker Compose¶
Docker compose is the recommended way to run Faridoon. This page assumes that you have a working understanding of Docker and Docker Compose. If you are new to Docker, please refer to the Docker documentation.
You can use the following docker-compose.yml
file to run Faridoon with Docker Compose:
docker-compose.yml
---
name: faridoon
services:
faridoon:
container_name: faridoon
image: ghcr.io/jamesread/faridoon
volumes:
- faridoon-config:/config
ports:
- "8080:8080"
environment:
DB_HOST: faridoon-mysql
DB_NAME: faridoon
DB_USER: faridoon
DB_PASS: toomanysecrets
restart: unless-stopped
networks:
- faridoon-network
depends_on:
faridoon-mysql:
condition: service_healthy
faridoon-mysql:
container_name: faridoon-mysql
image: mysql
volumes:
- faridoon-mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: hunter2
MYSQL_DATABASE: faridoon
MYSQL_USER: faridoon
MYSQL_PASSWORD: toomanysecrets
restart: unless-stopped
networks:
- faridoon-network
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost"]
interval: 20s
timeout: 5s
retries: 10
volumes:
faridoon-config:
faridoon-mysql:
networks:
faridoon-network:
Change your environment variables as necessary to set your passwords (DB_PASS
should be the same as MYSQL_PASSWORD
. DB_USER
should be the same as MYSQL_USER
, etc).
Save this file as docker-compose.yml
and run docker-compose up -d
in the same directory. Faridoon will be available at http://localhost:8080
.