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

add skaffold #6

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

add skaffold #6

wants to merge 4 commits into from

Conversation

lucido-simon
Copy link

@lucido-simon lucido-simon commented Jan 30, 2024

This PR adds Skaffold as a dev solution. The main idea is to replicate a close to production environment while developing applications.

The goal was to push a developer experience that doesn't compromise ease of use like you would on a local development environment using docker compose and nodemon. When running skaffold dev, skaffold will build docker images, push them to the cluster in the current kubernetes context, and sync any source code modifications by copying file directly inside the container. This means that, excepts on first launch, no other docker build happens. This allows for extremely fast iterations, just like you would on a more traditional setup.

To do so, this PR brings the following changes:

  • Retry DB connections, inside the database module. This is to avoid api crashes on first startup, when the database is not yet ready.
  • A dev dockerfile, that launches the app in development mode, watching for source file changes.
  • Kustomize templates for the api and www apps, with local overlays that takes into account specificities of a dev environment. For example, we start a postgres with the API, so that the developer doesn't have to start one when developing.
  • Skaffold configuration

Any feedback is welcome

Signed-off-by: Simon Lucido <[email protected]>
Kustomize templates for both www and api.

Postgres chart is used for the backend deployment when
deploying on a local cluster, for convenience.

Signed-off-by: Simon Lucido <[email protected]>
Signed-off-by: Simon Lucido <[email protected]>
@lucido-simon lucido-simon marked this pull request as ready for review January 30, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant