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

Change Gitea to use existing Postgres deployment #19

Merged
merged 1 commit into from
Feb 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion foundry/gitea.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ gitea:
server:
DOMAIN: https://foundry.local/gitea/
ROOT_URL: https://foundry.local/gitea/
database:
DB_TYPE: postgres
HOST: postgresql:5432
NAME: gitea
USER: postgres
PASSWD: foundry
SCHEMA: public
security:
PASSWORD_COMPLEXITY: "off"
repository:
Expand Down Expand Up @@ -142,7 +149,7 @@ memcached:
port: 11211

postgresql:
enabled: true
enabled: false
global:
postgresql:
postgresqlDatabase: gitea
Expand Down
3 changes: 2 additions & 1 deletion foundry/setup-foundry
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kubectl create secret tls appliance-cert --key certs/host-key.pem --cert <( cat
# Install PostgreSQL and pgAdmin4
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add runix https://helm.runix.net/
helm install -f postgresql.values.yaml postgresql bitnami/postgresql
helm install --wait -f postgresql.values.yaml postgresql bitnami/postgresql
#helm install -f pgadmin4.values.yaml pgadmin4 runix/pgadmin4

# Install code-server (browser-based VS Code)
Expand All @@ -46,6 +46,7 @@ cp certs/root-ca.pem ../mkdocs/docs/root-ca.crt
# Install Gitea
git config --global init.defaultBranch main
helm repo add gitea https://dl.gitea.io/charts/
kubectl exec postgresql-0 -- psql 'postgresql://postgres:foundry@localhost' -c 'CREATE DATABASE gitea;'
helm install -f gitea.values.yaml gitea gitea/gitea
timeout 5m bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' https://foundry.local/gitea)" != "200" ]]; do sleep 5; done' || false
./setup-gitea
Expand Down