Skip to content

Commit c6cfb1d

Browse files
committed
Initial commit
0 parents  commit c6cfb1d

3 files changed

Lines changed: 101 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
release:
11+
types:
12+
- created
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
21+
22+
- name: Docker meta
23+
id: meta
24+
uses: docker/metadata-action@v3
25+
with:
26+
images: docker.pkg.github.com/appvia/hello-world/hello-world
27+
28+
- name: Build and export to Docker
29+
uses: docker/build-push-action@v2
30+
with:
31+
load: true
32+
tags: ${{ steps.meta.outputs.tags }}
33+
labels: ${{ steps.meta.outputs.labels }}
34+
35+
- name: Login to docker registry
36+
if: ${{ github.event_name != 'pull_request' }}
37+
uses: docker/login-action@v1
38+
with:
39+
registry: docker.pkg.github.com
40+
username: ${{ github.actor }}
41+
password: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Push to GitHub Packages
44+
uses: docker/build-push-action@v2
45+
with:
46+
push: ${{ github.event_name != 'pull_request' }}
47+
tags: ${{ steps.meta.outputs.tags }}
48+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM alpine:latest
2+
LABEL maintainer "info@appvia.io"
3+
LABEL source "https://github.com/appvia/hello-world"
4+
5+
# Set working directory
6+
WORKDIR /app
7+
ENV HOME /app
8+
9+
# Update and install packages
10+
RUN apk add -U python3
11+
12+
# Create a non-root user and set file permissions
13+
RUN addgroup -S app \
14+
&& adduser -S -g app -u 1000 app \
15+
&& chown -R app:app /app
16+
17+
# Run as the non-root user
18+
USER 1000
19+
20+
COPY index.html /app
21+
22+
ENTRYPOINT ["/usr/bin/python3", "-m", "http.server", "8080"]

index.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<head>
3+
<title>Hello, World!</title>
4+
<style>
5+
body {
6+
background-color: #B9D9EB;
7+
}
8+
9+
p {
10+
color: #334A47;
11+
font-family: Montserrat-VF,Montserrat,sans-serif;
12+
font-size: 60px;
13+
font-weight: bold;
14+
position: absolute;
15+
top: 50%;
16+
left: 50%;
17+
-moz-transform: translateX(-50%) translateY(-50%);
18+
-webkit-transform: translateX(-50%) translateY(-50%);
19+
transform: translateX(-50%) translateY(-50%);
20+
}
21+
22+
a {
23+
color: #334A47;
24+
text-decoration: none;
25+
}
26+
</style>
27+
</head>
28+
<body>
29+
<p><a href="https://www.appvia.io">Hello, World!</a></p>
30+
</body>
31+
</html>

0 commit comments

Comments
 (0)