-
Notifications
You must be signed in to change notification settings - Fork 0
Updates for sample-python #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,11 +2,6 @@ on: | |
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'config/**' | ||
| - 'site/**' | ||
| - 'Dockerfile' | ||
| - '.github/workflows/**' | ||
|
|
||
| jobs: | ||
|
|
||
|
|
@@ -18,9 +13,6 @@ jobs: | |
| - name: Checkout master | ||
| uses: actions/checkout@main | ||
|
|
||
| - name: Update SHA | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is failing as it the directory does not exist. It is part of the static site example and not needed for the python app. https://github.com/sharmita3/sample-python/runs/1481140544?check_suite_focus=true#step:3:4 |
||
| run: echo $GITHUB_SHA > $GITHUB_WORKSPACE/site/_meta | ||
|
|
||
| - name: Build container image | ||
| run: docker build -t registry.digitalocean.com/sdas/python-example:$(echo $GITHUB_SHA | head -c7) . | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,16 +36,12 @@ apiVersion: v1 | |
| kind: Service | ||
| metadata: | ||
| name: python-example-service | ||
| annotations: | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These annotations are used to manage DNS using https://www.digitalocean.com/docs/kubernetes/how-to/configure-load-balancers/#ssl-certificates |
||
| external-dns.alpha.kubernetes.io/hostname: "doctl-action.do-api.dev" | ||
| service.beta.kubernetes.io/do-loadbalancer-certificate-id: "37f354b1-0043-4bef-84b9-4666390026f3" | ||
| service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true" | ||
| spec: | ||
| type: LoadBalancer | ||
| ports: | ||
| - name: https | ||
| - name: http | ||
| protocol: TCP | ||
| port: 443 | ||
| targetPort: 5000 | ||
| port: 80 | ||
| targetPort: 80 | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This app listens on port 80, so we need to update the https://github.com/sharmita3/sample-python/blob/main/server.py#L16 Since we removed the SSL configuration above, we need to change the |
||
| selector: | ||
| app: python-example | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is used to make the action trigger only on changes to certain files. It's not required. In my example repo, I did it mainly to keep it from deploying on changes to the README. You can remove it completely like this or update it to include the things required for the python app (e.g.
server.py).https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths