Skip to content

Commit 64a4222

Browse files
committed
initial commit
0 parents  commit 64a4222

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build Container
2+
on:
3+
workflow_dispatch:
4+
5+
env:
6+
REGISTRY: ghcr.io
7+
GITHUB_REPO: ${{ github.repository }}
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Log in to the Container registry
20+
uses: docker/login-action@v3
21+
with:
22+
registry: ${{ env.REGISTRY }}
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Extract metadata (tags, labels) for Docker
27+
id: meta
28+
uses: docker/metadata-action@v5
29+
with:
30+
images: ${{ env.REGISTRY }}/${{ env.GITHUB_REPO }}
31+
tags: |
32+
type=raw,value=latest
33+
type=raw,value=stable,enable=${{ github.event_name == 'release' }}
34+
type=semver,pattern={{version}},enable=${{ github.event_name == 'release' }}
35+
type=sha,priority=250,enable=${{ github.event_name == 'workflow_dispatch' }}
36+
37+
- name: Build and push Docker image
38+
uses: docker/build-push-action@v6
39+
with:
40+
context: .
41+
push: true
42+
tags: ${{ steps.meta.outputs.tags }}
43+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM nginx:stable-alpine
2+
3+
# Copy config file
4+
COPY nginx.conf /etc/nginx/conf.d/default.conf
5+
6+
EXPOSE 80
7+
CMD ["nginx", "-g", "daemon off;"]

nginx.conf

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
server {
2+
listen 80;
3+
4+
root /data;
5+
6+
index pack.toml index.html;
7+
8+
location / {
9+
try_files $uri =404;
10+
}
11+
12+
include /etc/nginx/extra-conf.d/*.conf;
13+
}

0 commit comments

Comments
 (0)