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

creates kubernetes friendly deployment #268

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

kochie
Copy link
Contributor

@kochie kochie commented Oct 12, 2023

This PR changes some of the deployment parameters to work better in a Kubernetes environment. It's a work in progress and will most likely break other deployments at the moment. I've pushed it so others can see what's required to get working in K8s.

Documentation to follow!

@vercel
Copy link

vercel bot commented Oct 12, 2023

@kochie is attempting to deploy a commit to the Bigcapital Team on Vercel.

A member of the Team first needs to authorize it.

@@ -5,4 +5,8 @@ server {
root /usr/share/nginx/html;
try_files $uri /index.html;
}

location /api {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This redirect already added in docker/nginx/sites/server.template

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this was due to not wanting an extra container just for nginx. Depending on the setup there are a few interesting ways to run ingress.

image: ghcr.io/bigcapitalhq/webapp:latest
build:
context: ./
dockerfile: packages/webapp/Dockerfile
Copy link
Contributor

@abouolia abouolia Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Webapp container building is done by CI/CD (Github actions) by Dockerfile that under /packages/webapp, when we deploy in prod we're just pulling out from public registry.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that absolutely should be the way to do it. I was tinkering with the code (to fix invoicing) and needed to change the source.

bind-address = 0.0.0.0
innodb_temp_data_file_path = ../../../tmp/ibtmp1:12M:autoextend
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done because I'm running my cluster on a series on Raspberry Pis and using Longhorn NFS which is too slow for the temp directory. This is documented in mariadb.

@@ -1,4 +1,4 @@
FROM ghcr.io/bigcapitalhq/server:latest as build
FROM kochie/bigcapital-server:latest as build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change back

@@ -1,5 +1,5 @@
# Migrate the master system database.
./wait-for-it/wait-for-it.sh mysql:3306 -- node ./build/commands.js system:migrate:latest
./wait-for-it/wait-for-it.sh ${DB_HOST}:3306 -- node ./build/commands.js system:migrate:latest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

host changes in k8s depending on how the containers are setup

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.

2 participants