Last active
September 11, 2018 13:53
-
-
Save takezoe/48823772ff9b9d68ea121c147ccb0832 to your computer and use it in GitHub Desktop.
Run GitBucket + PostgreSQL on Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: gitbucket | |
labels: | |
app: gitbucket | |
spec: | |
containers: | |
- name: postgresql | |
image: postgres:9.5-alpine | |
volumeMounts: | |
- name: gitbucket-postgresql-data | |
mountPath: /var/lib/postgresql/data | |
env: | |
- name: POSTGRES_DB | |
value: gitbucket | |
- name: POSTGRES_USER | |
value: gitbucket | |
- name: POSTGRES_PASSWORD | |
value: gitbucket | |
ports: | |
- containerPort: 5432 | |
- name: gitbucket | |
image: takezoe/gitbucket | |
volumeMounts: | |
- name: gitbucket-data | |
mountPath: /gitbucket | |
env: | |
- name: GITBUCKET_DB_URL | |
value: jdbc:postgresql://localhost/gitbucket | |
- name: GITBUCKET_DB_USER | |
value: gitbucket | |
- name: GITBUCKET_DB_PASSWORD | |
value: gitbucket | |
ports: | |
- containerPort: 8080 | |
volumes: | |
- name: gitbucket-data | |
emptyDir: {} | |
- name: gitbucket-postgresql-data | |
emptyDir: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In this case, GitBucket is running at port 30010 on the deployed node. If you are doing this tutorial with minikube on MacOS, you can open GitBucket in your browser by following command:
$ open "http://$(minikube ip):30010"