Skip to content

Deploy using Docker

Hollo provides the official Docker images on GitHub Packages. You can use them to deploy Hollo on your server or your local machine:

docker pull ghcr.io/dahlia/hollo:latest

To run Hollo, you need to set up a PostgreSQL database and an S3-compatible object storage for media storage. You can use the official Docker image for PostgreSQL, and you can use MinIO for the S3-compatible object storage. Or you can use other managed services like AWS RDS, ElastiCache, and S3.

To connect Hollo to these services, you need to set the environment variables through docker run command’s -e/--env option or --env-file option. To list the environment variables that Hollo supports, see the Environment variables chapter.

Docker Compose

To wire up these services, you can use Docker Compose. Here’s an example compose.yaml file:

compose.yaml
services:
hollo:
image: ghcr.io/dahlia/hollo:latest
ports:
- "3000:3000"
environment:
DATABASE_URL: "postgres://user:password@postgres:5432/database"
SECRET_KEY: "${SECRET_KEY}"
LOG_LEVEL: "${LOG_LEVEL}"
BEHIND_PROXY: "${BEHIND_PROXY}"
S3_REGION: us-east-1
S3_BUCKET: hollo
S3_URL_BASE: http://localhost:9000/hollo/
S3_ENDPOINT_URL: http://minio:9000
S3_FORCE_PATH_STYLE: "true"
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
depends_on:
- postgres
- minio
- create-bucket
restart: unless-stopped
postgres:
image: postgres:15
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: database
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
minio:
image: minio/minio:RELEASE.2024-09-13T20-26-02Z
ports:
- "9000:9000"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- minio_data:/data
command: ["server", "/data", "--console-address", ":9001"]
create-bucket:
image: minio/mc:RELEASE.2024-09-16T17-43-14Z
depends_on:
- minio
entrypoint: |
/bin/sh -c "
/usr/bin/mc alias set minio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb minio/hollo;
/usr/bin/mc anonymous set public minio/hollo;
exit 0;
"
volumes:
postgres_data:
minio_data:

Save this file as compose.yaml in your working directory, and then run the following command:

docker compose up -d