Deploying with Docker Compose
Before proceeding, we recommend reading the Introduction, which can quickly help you understand Ikaros.
Setting Up the Environment
- Docker Installation Guide: https://docs.docker.com/engine/install/
- Docker Compose Installation Guide: https://docs.docker.com/compose/install/
We recommend installing Docker and Docker Compose following the official Docker documentation, as the Docker version in the software repositories of some Linux distributions may be outdated.
Creating Container Group
Available Docker images for Ikaros:
Currently, Ikaros has not updated the Docker image with the latest tag, mainly because no official version has been released yet. We recommend using specific version tags, such as ikarosrun/ikaros:v0.7.4.
ikarosrun/ikaros:v0.7.4: Represents the latest available image. A new image is built for each release based on GitHub tags.ikarosrun/ikaros:dev: Represents the image in development. It is not recommended for use, as it is rebuilt and overwritten with each merged Pull Request into the main branch.
Subsequent documentation will use ikarosrun/ikaros:v0.7.4 as an example.
Create a folder anywhere in the system. This document uses
~/ikarosas an example.mkdir ~/ikaros && cd ~/ikarosinfoNote: In subsequent operations, all data generated by Ikaros will be saved in this directory. Please keep it safe.
Create
docker-compose.yamlThis document provides Docker Compose configuration files for two scenarios. Please choose one based on your needs.
Create an instance of Ikaros + PostgreSQL:
~/ikaros/docker-compose.yamlversion: "3"
services:
# ikaros
ikaros:
image: ikarosrun/ikaros:v0.7.4
container_name: ikaros
restart: on-failure:3
depends_on:
ikaros_database:
condition: service_healthy
networks:
ikaros_networks:
volumes:
- ./:/root/.ikaros
ports:
- "9999:9999"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9999/actuator/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
environment:
- LANG=C.UTF-8
- LC_ALL=C.UTF-8
- TZ=Asia/Shanghai
command:
- --logging.charset.console=UTF-8
- --logging.charset.file=UTF-8
# log level for package, such as INFO or DEBUG
- --logging.level.run.ikaros.server=INFO
- --logging.level.run.ikaros.plugin=INFO
- --logging.level.run.ikaros.jellyfin=INFO
- --sun.jnu.encoding=UTF-8
- --spring.r2dbc.url=r2dbc:pool:postgresql://ikaros_database/ikaros
- --spring.r2dbc.username=ikaros
# Make sure the password for PostgreSQL matches the value of the POSTGRES_PASSWORD variable below.
- --spring.r2dbc.password=openpostgresql
- --spring.sql.init.platform=postgresql
# Initial superuser username
- --ikaros.security.initializer.master-username=tomoki
# Initial superuser password
- --ikaros.security.initializer.master-password=tomoki
# ikaros database
ikaros_database:
image: postgres:latest
container_name: ikaros_database
restart: on-failure:3
networks:
ikaros_networks:
volumes:
- ./database:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_DB=ikaros
- POSTGRES_USER=ikaros
- POSTGRES_PASSWORD=openpostgresql
networks:
ikaros_networks:
driver: bridgeCreate Ikaros instance only (using the default H2 database, not recommended for production environment, suggested for experience and testing only):
~/ikaros/docker-compose.yamlversion: "3"
services:
# ikaros
ikaros:
image: ikarosrun/ikaros:v0.7.4
container_name: ikaros
restart: on-failure:3
networks:
ikaros_networks:
volumes:
- ./:/root/.ikaros
ports:
- "9999:9999"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9999/actuator/health"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
environment:
- LANG=C.UTF-8
- LC_ALL=C.UTF-8
- TZ=Asia/Shanghai
command:
- --logging.charset.console=UTF-8
- --logging.charset.file=UTF-8
- --logging.level.run.ikaros.server=INFO
- --logging.level.run.ikaros.plugin=INFO
- --logging.level.run.ikaros.jellyfin=INFO
- --sun.jnu.encoding=UTF-8
# Initial superuser username
- --ikaros.security.initializer.master-username=tomoki
# Initial superuser password
- --ikaros.security.initializer.master-password=tomoki
networks:
ikaros_networks:
driver: bridge
Parameter Details:
Parameter Name Description spring.r2dbc.urlDatabase connection URL, see Database Configurationbelow for detailsspring.r2dbc.usernameDatabase username spring.r2dbc.passwordDatabase password spring.sql.init.platformDatabase platform name, supports postgresql,h2ikaros.security.initializer.master-usernameInitial superuser username ikaros.security.initializer.master-passwordInitial superuser password Database Configuration:
Connection Method Connection Address Format spring.sql.init.platformPostgreSQL r2dbc:pool:postgresql://{HOST}:{PORT}/{DATABASE}postgresql H2 Database r2dbc:h2:file:///${ikaros.work-dir}/db/ikaros?MODE=MySQL&DB_CLOSE_ON_EXIT=FALSEh2 Start the Ikaros service
docker-compose up -dView logs in real-time:
docker-compose logs -f ikarosAccess the Ikaros management page by visiting
/consolein your browser. The username and password are the ones set in thedocker-compose.yamlfile asmaster-usernameandmaster-password.
If not started with these parameters, the default username is tomoki, and the password will be printed in the logs (printed only on the first run).
Updating Container Group
Stop the running container group.
cd ~/ikaros && docker-compose downBackup Data (Important)
cp -r ~/ikaros ~/ikaros.archiveIt's worth noting that the
ikaros.archivefilename doesn't necessarily have to follow the naming convention in this document. This is just an example.
Update the Ikaros service
Modify the image version configured in
docker-compose.yaml.services:
ikaros:
image: ikarosrun/ikaros:v0.7.4
container_name: ikarosdocker-compose pull ikarosdocker-compose up -d