feat: docker and versioning stuff
This commit is contained in:
@@ -0,0 +1 @@
|
||||
MAIN_PORT=8080
|
||||
@@ -24,19 +24,15 @@ jobs:
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
version="$(tr -d '[:space:]' < VERSION)"
|
||||
version="$(git rev-parse --short=12 HEAD)"
|
||||
|
||||
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.+][0-9A-Za-z.-]+)?$ ]]; then
|
||||
echo "Invalid VERSION value: $version" >&2
|
||||
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
|
||||
echo "Invalid git hash version: $version" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker_tag="${version//+/-}"
|
||||
short_sha="${GITHUB_SHA::7}"
|
||||
|
||||
echo "value=$version" >> "$GITHUB_OUTPUT"
|
||||
echo "docker_tag=$docker_tag" >> "$GITHUB_OUTPUT"
|
||||
echo "dev_tag=${docker_tag}-dev.${short_sha}" >> "$GITHUB_OUTPUT"
|
||||
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
@@ -59,7 +55,6 @@ jobs:
|
||||
VCS_REF=${{ github.sha }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.dev_tag }}
|
||||
labels: |
|
||||
org.opencontainers.image.version=${{ steps.version.outputs.value }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
@@ -29,18 +29,16 @@ jobs:
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
version="$(tr -d '[:space:]' < VERSION)"
|
||||
version="$(git rev-parse --short=12 HEAD)"
|
||||
|
||||
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.+][0-9A-Za-z.-]+)?$ ]]; then
|
||||
echo "Invalid VERSION value: $version" >&2
|
||||
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
|
||||
echo "Invalid git hash version: $version" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker_tag="${version//+/-}"
|
||||
|
||||
echo "value=$version" >> "$GITHUB_OUTPUT"
|
||||
echo "docker_tag=$docker_tag" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=v$docker_tag" >> "$GITHUB_OUTPUT"
|
||||
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
|
||||
echo "release_tag=v$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# OS files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
desktop.ini
|
||||
|
||||
# IDE files
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Environment files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Dependencies and build output
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
|
||||
# Docker/local runtime artifacts
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Temporary files
|
||||
tmp/
|
||||
temp/
|
||||
.cache/
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Ignored default folder with query files
|
||||
/queries/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
+4
-3
@@ -1,14 +1,15 @@
|
||||
services:
|
||||
portfolio:
|
||||
image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG}
|
||||
image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
- path: .env
|
||||
required: false
|
||||
dns:
|
||||
- 192.168.100.2
|
||||
- 192.168.100.6
|
||||
ports:
|
||||
- ${MAIN_PORT}:80
|
||||
- "${MAIN_PORT:-8080}:80"
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
<a href="tel:+436609254001">+43 660 9254001</a>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="site-footer">
|
||||
Lechner-Systems © <a href="https://fraujulian.xyz/imprint">Impressum</a>
|
||||
</footer>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -10,6 +10,9 @@ body {
|
||||
padding: 96px 24px;
|
||||
font: 20px Helvetica, sans-serif;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -59,6 +62,13 @@ a:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-footer {
|
||||
margin-top: auto;
|
||||
padding-top: 48px;
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@-moz-keyframes spin {
|
||||
100% {
|
||||
-moz-transform: rotate(360deg);
|
||||
|
||||
Reference in New Issue
Block a user