Skip to content

Commit 1098084

Browse files
committed
Update
1 parent 62eed6a commit 1098084

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed

.github/workflows/update.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Push Docker Image
2+
3+
4+
on:
5+
push:
6+
branches:
7+
8+
- V1
9+
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
env:
15+
16+
project: "project-aclg"
17+
architecture: "linux/arm64"
18+
19+
steps:
20+
21+
- name: Evaluate Commit Message
22+
run: |
23+
24+
commitMessage="${{ github.event.head_commit.message }}";
25+
26+
if [ "$commitMessage" != "Update" ]; then
27+
28+
echo "Cancelling Workflow.";
29+
exit 1;
30+
31+
fi
32+
33+
- name: Checkout Repository
34+
uses: actions/checkout@v4
35+
36+
- name: Setup QEMU
37+
uses: docker/setup-qemu-action@v3
38+
39+
- name: Setup Docker Buildx
40+
uses: docker/setup-buildx-action@v3
41+
42+
- name: Login to Docker Hub
43+
uses: docker/login-action@v3
44+
with:
45+
username: ${{ secrets.DOCKERHUBUSERNAME }}
46+
password: ${{ secrets.DOCKERHUBTOKEN }}
47+
48+
- name: Build and Push Docker Image
49+
uses: docker/build-push-action@v5
50+
with:
51+
context: .
52+
push: true
53+
platforms: ${{ env.architecture }}
54+
tags: ${{ secrets.DOCKERHUBUSERNAME }}/${{ env.project }}:latest

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# official Python image as the base image
2+
FROM python:3.8-slim
3+
4+
# referencing docker compose (find wiki) #
5+
ENV PORT ${PORT}
6+
7+
WORKDIR /app
8+
COPY . .
9+
RUN pip install -r requirements.txt
10+
EXPOSE 8060
11+
12+
# run dash application
13+
CMD ["python3", "main.py"]

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
objCallbacks.register()
1515
application.layout = objLayout.layout
1616

17-
application.run(debug = True, port = 8059)
17+
application.run(host = '0.0.0.0', port = 8060)
1818

0 commit comments

Comments
 (0)