Skip to content

Commit

Permalink
publish version 0.14 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chivehao committed Jul 21, 2024
1 parent c51eb86 commit 0890399
Show file tree
Hide file tree
Showing 52 changed files with 2,768 additions and 0 deletions.
22 changes: 22 additions & 0 deletions i18n/en/docusaurus-plugin-content-docs/version-0.14.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version.label": {
"message": "0.14",
"description": "The label for version 0.14"
},
"sidebar.docsSidebar.category.getting-started": {
"message": "getting-started",
"description": "The label for category getting-started in sidebar docsSidebar"
},
"sidebar.docsSidebar.category.getting-started-install": {
"message": "getting-started-install",
"description": "The label for category getting-started-install in sidebar docsSidebar"
},
"sidebar.docsSidebar.category.user-guide": {
"message": "user-guide",
"description": "The label for category user-guide in sidebar docsSidebar"
},
"sidebar.docsSidebar.category.plugins": {
"message": "plugins",
"description": "The label for category plugins in sidebar docsSidebar"
}
}
17 changes: 17 additions & 0 deletions i18n/en/docusaurus-plugin-content-docs/version-0.14/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: About the Documentation
sidebar_label: About
description: Information about this documentation site
---

:::note
This documentation site is built using [Docusaurus](https://docusaurus.io/). Thanks to the [Docusaurus community](https://github.com/facebook/docusaurus) for their contributions.
:::

## Contributing

:::tip
If you find any inaccuracies or have content to add, we welcome your contributions to the documentation.
:::

The current repository for this documentation is located at [ikaros-dev/docs](https://github.com/ikaros-dev/docs). You can fork this repository, make your changes, and submit a pull request for us to review and merge.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Android App (WIP)
description: Native Android App
---

## Introduction

Native app for Android phones.

GitHub: <https://github.com/ikaros-dev/andapp>

:::tip
CI packaging has not been set up yet.
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
---
title: Deploying with Docker Compose
description: Deploying with Docker Compose
---

import DockerArgs from "./slots/docker-args.md"

:::info
Before proceeding, we recommend reading the [Introduction](../prepare.md), 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/>

:::tip
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:

- [ikarosrun/ikaros](https://hub.docker.com/r/ikarosrun/ikaros)

:::info Note
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.11.5`.

- `ikarosrun/ikaros:v0.11.5`: 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.11.5` as an example.
:::

1. Create a folder anywhere in the system. This document uses `~/ikaros` as an example.

```bash
mkdir ~/ikaros && cd ~/ikaros
```
:::info
Note: In subsequent operations, all data generated by Ikaros will be saved in this directory. Please keep it safe.
:::

2. Create `docker-compose.yaml`

This document provides Docker Compose configuration files for two scenarios. Please choose one based on your needs.

1. Create an instance of Ikaros + PostgreSQL:

```yaml {24-34,51} title="~/ikaros/docker-compose.yaml"
version: "3"
services:
# ikaros
ikaros:
image: ikarosrun/ikaros:v0.11.5
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: bridge
```

2. Create Ikaros instance only (using the default H2 database, **not recommended for production environment, suggested for experience and testing only**):

```yaml {19-24} title="~/ikaros/docker-compose.yaml"
version: "3"
services:
# ikaros
ikaros:
image: ikarosrun/ikaros:v0.11.5
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:

<DockerArgs />

3. Start the Ikaros service

```bash
docker-compose up -d
```

View logs in real-time:

```bash
docker-compose logs -f ikaros
```

4. Access the Ikaros management page by visiting `/console` in your browser. The username and password are the ones set in the `docker-compose.yaml` file as `master-username` and `master-password`.

:::tip
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

1. Stop the running container group.

```bash
cd ~/ikaros && docker-compose down
```

2. Backup Data (Important)

```bash
cp -r ~/ikaros ~/ikaros.archive
```

> It's worth noting that the `ikaros.archive` filename doesn't necessarily have to follow the naming convention in this document. This is just an example.

3. Update the Ikaros service

Modify the image version configured in `docker-compose.yaml`.

```yaml {3}
services:
ikaros:
image: ikarosrun/ikaros:v0.11.5
container_name: ikaros
```
```bash
docker-compose pull ikaros
```

```bash
docker-compose up -d
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Deploying with Docker
description: Deploying with Docker
---

import DockerArgs from "./slots/docker-args.md"

:::info
Before proceeding, we recommend reading [Introduction](../prepare), which can quickly help you understand Ikaros.
:::

:::tip
This document only provides a way to run Docker with the default H2 database, mainly for experience and testing. We do not recommend using the H2 database in a production environment.

If you need to deploy with another database, we recommend using Docker Compose: [Deploying with Docker Compose](./docker-compose)
:::

## Setting Up the Environment

- Docker Installation Guide: <https://docs.docker.com/engine/install/>

:::tip
We recommend installing Docker following the official Docker documentation, as the Docker version in the software repositories of some Linux distributions may be outdated.
:::

## Using Docker Image

Available Docker images for Ikaros:

- [ikarosrun/ikaros](https://hub.docker.com/r/ikarosrun/ikaros)

:::info Note
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.11.5`.

- `ikarosrun/ikaros:v0.11.5`: 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.11.5` as an example.
:::

1. Create a Container

```bash
docker run \
-it -d \
--name ikaros \
-p 9999:9999 \
-v ~/.ikaros:/root/.ikaros \
ikarosrun/ikaros:v0.11.5 \
--ikaros.security.initializer.master-username=tomoki \
--ikaros.security.initializer.master-password=tomoki
```

:::info
Note: This command uses the built-in H2 Database by default. If you want to use PostgreSQL, please refer to: [Deploying with Docker Compose](./docker-compose)
:::

- **-it**: Enables input and connects to a pseudo-terminal.
- **-d**: Runs the container in the background.
- **--name**: Specifies a name for the container.
- **-p**: Port mapping, in the format of `host_port:container_port`.
- **-v**: Maps the working directory, in the form of `-v host_path:/root/.ikaros`, where the latter cannot be modified.

Parameter Details:


<DockerArgs />

1. Access the Ikaros management page by visiting `/console` in your browser. The username and password are the ones set in the startup parameters as `master-username` and `master-password`.

:::tip
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).
:::

## Upgrade Version

1. Pull the new version image (please choose the latest tag and replace `v0.11.5` below)

```bash
docker pull ikarosrun/ikaros:v0.11.5
```

2. Stop the running container

```bash
docker stop ikaros
docker rm ikaros
```

3. Backup Data (Important)

```bash
cp -r ~/.ikaros ~/ikaros.archive
```

> It's worth noting that the `ikaros.archive` filename doesn't necessarily have to follow the naming convention in this document. This is just an example.

4. Update Ikaros

After modifying the version number, recreate the container following the initial installation method.

```bash {6}
docker run \
-it -d \
--name ikaros \
-p 9999:9999 \
-v ~/.ikaros:/root/.ikaros \
ikarosrun/ikaros:v0.11.5 \
--ikaros.security.initializer.master-username=tomoki \
--ikaros.security.initializer.master-password=tomoki
```
Loading

0 comments on commit 0890399

Please sign in to comment.