Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how alembic is run in production via the containers #45

Open
devraj opened this issue Sep 14, 2022 · 1 comment
Open

Document how alembic is run in production via the containers #45

devraj opened this issue Sep 14, 2022 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@devraj
Copy link
Member

devraj commented Sep 14, 2022

Extending #44 we should define how alembic is configured in the production container and how you are expected to run the migration in production environments.

We should also think about providing Task based scripts, Tasks is available as a Github action which would work well with the proposed CI/CD workflow.

@devraj devraj self-assigned this Sep 14, 2022
@devraj devraj added the documentation Improvements or additions to documentation label Mar 6, 2023
devraj added a commit that referenced this issue Sep 12, 2023
fixes references to incorrect container build files, separates release
and build tasks to make more sense, adds tasks for publishing the helm chart
prepares for #45
@devraj
Copy link
Member Author

devraj commented Oct 6, 2023

I was making some headway on this on a client's project that uses this template. My initial approach was to make a Taskfile that would be suitable for production and make available a subset of operations like:

  • Run alembic migration
  • Attach the database to head of the migrations, this can be useful if we are initialising a blank database but subsequently want to run migrations
  • Leave a task that allows the developer to run arbitrary alembic operations

Debian does not have an official go-task package but Apline linux does. These are the two Linux flavours published by the official Python base image.

Shifting to Apline would mean a massive move away from our general toolkit.

People have workarounds using tools like pacstall (in this instance on Ubuntu). Before we can provide this as part of the template we would have to figure out how we install task on Debian.

Failing everything task provides a binary

sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d

We already have curl available on the pods to assist with other actions. I have tested this on our current images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant