Skip to content

Commit fba9984

Browse files
authored
Properly build docker images workflow (#42)
* v0.4.3-alpha.6 * try to enable "latest" label * try type=raw * bump to 0.4.3-alpha.9 * add empty ingress tls options * add version info to profile page * use tls.enabled * bump version to 0.4.3
1 parent 32d13f3 commit fba9984

File tree

14 files changed

+123
-121
lines changed

14 files changed

+123
-121
lines changed

.github/workflows/docker-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
type=semver,pattern={{major}}.{{minor}}
4343
type=semver,pattern={{major}}
4444
type=sha
45+
type=raw,value=latest,enable=true
4546
-
4647
name: Set up QEMU
4748
uses: docker/setup-qemu-action@v2

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,8 @@ Make sure you have the runtime containers images pulled.
2020
- TODO use a more generic image tag here, e.g. latest
2121

2222
```
23-
docker pull lihebi/codepod-kernel-python:v0.4.3-alpha.4
24-
docker pull lihebi/codepod-runtime:v0.4.3-alpha.4
25-
```
26-
27-
Or you can build the images:
28-
29-
```
30-
docker build -t lihebi/codepod-kernel-python:v0.4.3-alpha.4 ./runtime/kernel
31-
docker build -t lihebi/codepod-runtime:v0.4.3-alpha.4 ./runtime
23+
docker pull lihebi/codepod-kernel-python
24+
docker pull lihebi/codepod-runtime
3225
```
3326

3427
## Usage

compose/dev/compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ services:
3636
JWT_SECRET: ${JWT_SECRET}
3737
KERNEL_NETWORK: "codepod"
3838
PROXY_API_URL: "http://proxy:4011/graphql"
39-
ZMQ_KERNEL_IMAGE: "lihebi/codepod-kernel-python:v0.4.3-alpha.4"
40-
WS_RUNTIME_IMAGE: "lihebi/codepod-runtime:v0.4.3-alpha.4"
39+
ZMQ_KERNEL_IMAGE: "lihebi/codepod-kernel-python:latest"
40+
WS_RUNTIME_IMAGE: "lihebi/codepod-runtime:latest"
4141

4242
ui:
4343
image: node:18

compose/prod/compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ services:
2424
JWT_SECRET: ${JWT_SECRET}
2525
KERNEL_NETWORK: "codepod"
2626
PROXY_API_URL: "http://proxy:4011/graphql"
27-
ZMQ_KERNEL_IMAGE: "lihebi/codepod-kernel-python:v0.4.3-alpha.4"
28-
WS_RUNTIME_IMAGE: "lihebi/codepod-runtime:v0.4.3-alpha.4"
27+
ZMQ_KERNEL_IMAGE: "lihebi/codepod-kernel-python:latest"
28+
WS_RUNTIME_IMAGE: "lihebi/codepod-runtime:latest"
2929

3030
ui:
3131
build: ../../ui

deploy.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
Build the docker images:
44

55
```
6-
docker build -t lihebi/codepod-ui:v0.4.3-alpha.4 ./ui
7-
docker build -t lihebi/codepod-api:v0.4.3-alpha.4 ./api
8-
docker build -t lihebi/codepod-proxy:v0.4.3-alpha.4 ./proxy
9-
docker build -t lihebi/codepod-kernel-python:v0.4.3-alpha.4 ./runtime/kernel
10-
docker build -t lihebi/codepod-runtime:v0.4.3-alpha.4 ./runtime
6+
docker build -t lihebi/codepod-ui:<tag> ./ui
7+
docker build -t lihebi/codepod-api:<tag> ./api
8+
docker build -t lihebi/codepod-proxy:<tag> ./proxy
9+
docker build -t lihebi/codepod-kernel-python:<tag> ./runtime/kernel
10+
docker build -t lihebi/codepod-runtime:<tag> ./runtime
1111
```
1212

1313
Push to registry:
1414

1515
```
16-
docker push lihebi/codepod-ui:v0.4.3-alpha.4
17-
docker push lihebi/codepod-api:v0.4.3-alpha.4
18-
docker push lihebi/codepod-proxy:v0.4.3-alpha.4
19-
docker push lihebi/codepod-kernel-python:v0.4.3-alpha.4
20-
docker push lihebi/codepod-runtime:v0.4.3-alpha.4
16+
docker push lihebi/codepod-ui:<tag>
17+
docker push lihebi/codepod-api:<tag>
18+
docker push lihebi/codepod-proxy:<tag>
19+
docker push lihebi/codepod-kernel-python:<tag>
20+
docker push lihebi/codepod-runtime:<tag>
2121
```
2222

2323
Create a cloud VM with docker support. Add DNS from domain name to the cloud
@@ -61,8 +61,7 @@ npx prisma migrate dev --name init
6161
Pull the kernel image:
6262

6363
```
64-
docker pull lihebi/codepod-kernel-python:v0.4.3-alpha.4
65-
docker tag lihebi/codepod-kernel-python:v0.4.3-alpha.4 codepod-kernel-python
64+
docker pull lihebi/codepod-kernel-python
6665
```
6766

6867
Now go to

k8s/helm-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ version: 0.1.0
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "v0.4.3-alpha.4"
24+
appVersion: "0.4.3"

k8s/helm-chart/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@ Optionally initialize the DB (run in one api pod):
7676
Uninstall:
7777

7878
helm uninstall codepod-staging
79+
80+
Prod:
81+
82+
helm upgrade codepod-prod . --namespace codepod-prod --values=./values.prod.yaml

k8s/helm-chart/templates/ingress.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ kind: IngressRoute
1515
metadata:
1616
name: codepod-ingress
1717
spec:
18-
{{- if .Values.ingress.tls }}
18+
{{- if .Values.tls.enabled }}
1919
entryPoints:
2020
- websecure
2121
tls:
22-
secretName: {{ .Values.ingress.tls.secretName }}
22+
secretName: {{ .Values.tls.secretName }}
2323
{{- end }}
2424
routes:
2525
- match: "Host(`{{ .Values.hostname }}`) && PathPrefix(`/`)"
@@ -40,7 +40,7 @@ spec:
4040
- name: codepod-proxy-service
4141
port: 4010
4242

43-
{{- if .Values.ingress.tls }}
43+
{{- if .Values.tls.enabled }}
4444
---
4545
apiVersion: traefik.containo.us/v1alpha1
4646
kind: Middleware

k8s/helm-chart/values.prod.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
hostname: "app.codepod.io"
22

3-
ingress:
4-
tls:
5-
secretName: app-codepod-io-tls
3+
tls:
4+
enabled: true
5+
secretName: app-codepod-io-tls

k8s/helm-chart/values.staging.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
hostname: "codepod.127.0.0.1.sslip.io"
1+
hostname: "codepod.208.87.130.238.sslip.io"
2+
tls:
3+
enabled: false

0 commit comments

Comments
 (0)