Skip to content

Latest commit

 

History

History
115 lines (81 loc) · 2.76 KB

File metadata and controls

115 lines (81 loc) · 2.76 KB

Yeti Dev docker images

Clone this repo, then run ./init.sh. You might need some additional steps:

api container

The api container will run an envshell, so that it doesn't exit. To spin up a api listener, you should launch the following commands from the directory where the docker-compose.yaml file is.

docker compose exec api /bin/bash

Then once you get a root shell in the docker container (prompt like root@dcaa45f226bc:/app#)

poetry run uvicorn core.web.webapp:app --reload --host 0.0.0.0

NOTE: You can, of course, run all these commands directly into the docker exec command:

docker compose exec api poetry run uvicorn core.web.webapp:app --reload --host 0.0.0.0

This will work for all the other commands in this doc.

Celery

If you wanna work with feeds, you need to run a celery worker. To do so, you need to run the following command from the api container (prompt like root@772ea966d9a8:/app#)

poetry run celery -A core.taskscheduler worker --loglevel=INFO

Events tasks

If you wanna work with events tasks, you need to run one or several events consumers. To do so, you need to run the following command from the api container (prompt like root@772ea966d9a8:/app#).

poetry run python -m core.events.consumers events

You can adjust concurrency with --concurrency <number_of_worker> and enable debugging output with --debug.

Settings

If you want to make some tweaks to yeti.conf to make development a bit easier, copy the example file (cp yeti.conf.sample yeti.conf) and make changes such as:

The [auth] section should look like this:

[auth]

SECRET_KEY = SECRET
ALGORITHM = HS256
ACCESS_TOKEN_EXPIRE_MINUTES = 30
enabled = False

The [arangodb] section should look like this:

[arangodb]

host = arangodb
port = 8529
username = root
password =
database = yeti_dev

Create User for dev

docker compose exec -it api /docker-entrypoint.sh create-user yeti yeti --admin

frontend container

First time run

The frontend container starts a /bin/bash shell, so that it doesn't exit. To spin up a frontend listener, you should launch the following commands.

docker compose exec frontend /docker-entrypoint.sh dev

This will install all node modules so that the "installation" persists across container reboots (see yeti-feeds-frontend/docker/docker-entrypoint.sh) and then start a server listener. This will also set an install trace .node_installed so that the command can be called again without all the process of installing node modules.

Server listener

docker compose exec frontend /bin/bash

Then once you get a root shell in the docker container (prompt like root@772ea966d9a8:/app#):

npm run dev