FoundKey/docs/install-docker.md
Francis Dinh 5662635d45
Some checks failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/pr/lint-sw Pipeline failed
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline failed
Update branch checked out to "main"
2023-03-22 18:39:04 -04:00

2.1 KiB

Create FoundKey instance with Docker Compose

This guide describes how to install and setup FoundKey with Docker Compose.

WARNING: Never change the domain name (hostname) of an instance once you start using it!

Requirements

  • Docker or Podman
  • Docker Compose plugin (or podman-compose)

If using Podman, replace docker with podman. Commands using docker compose should be replaced with podman-compose.

You may need to prefix docker commands with sudo unless your user is in the docker group or you are running Docker in rootless mode.

Get the repository

git clone https://akkoma.dev/FoundKeyGang/FoundKey.git
cd FoundKey

Configure

Copy example configuration files with following:

cp .config/docker_example.yml .config/default.yml
cp .config/docker_example.env .config/docker.env

Edit default.yml and docker.env according to the instructions in the files. You will need to set the database host to db and Redis host to redis in order to use the internal container network for these services.

Edit docker-compose.yml if necessary. (e.g. if you want to change the port).

Build and initialize

The following command will build FoundKey and initialize the database. This will take some time.

docker compose build
docker compose run --rm web yarn run init

Launch

You can start FoundKey with the following command:

docker compose up -d

In case you are encountering issues, you can run docker compose logs -f to get the log output of the running containers.

How to update your FoundKey server

When updating, be sure to check the release notes to know in advance the changes and whether or not additional work is required (in most cases, it is not).

git stash
git checkout main
git pull
git stash pop
docker compose build
docker compose down && docker compose up -d

It may take some time depending on the contents of the update and the size of the database.

How to execute CLI commands

docker compose run --rm web node packages/backend/built/tools/foo bar