with docker.
Follow the steps to self-host the sentc api with docker compose.
- Copy and rename the following files:
.env.sample->.envsentc.env.sample->sentc.env
- Create a Root key with the sentc key gen and put it in ROOT_KEY:
docker-compose -f key_gen/docker-compose.yml up
- (optional but recommended) change mysql env in the .env file
To start the mysql version:
docker-compose -f mysql/docker-compose.yml up -dThis will also create a mariadb container. If you have already a db use:
docker-compose -f mysql/docker-compose.external_db.yml up -dMake sure the env: MYSQL_HOST for the mariadb host and MYSQL_DB for the mariadb database name are set.
To only start the services individual use:
docker-compose -f mysql/docker-compose.api.yml up -dTo start the api or:
docker-compose -f mysql/docker-compose.file_worker.yml up -dto start the file background worker.
Before to start make sure a sqlite db is already placed into the directory: db/sqlite.
You can use the db from the sentc-api repository. This dir will be a mounted volume into the docker container.
docker-compose -f sqlite/docker-compose.yml up -d