feat: docker and versioning stuff
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
MAIN_PORT=8080
|
||||||
@@ -24,19 +24,15 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
|
||||||
echo "Invalid VERSION value: $version" >&2
|
echo "Invalid git hash version: $version" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker_tag="${version//+/-}"
|
|
||||||
short_sha="${GITHUB_SHA::7}"
|
|
||||||
|
|
||||||
echo "value=$version" >> "$GITHUB_OUTPUT"
|
echo "value=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "docker_tag=$docker_tag" >> "$GITHUB_OUTPUT"
|
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "dev_tag=${docker_tag}-dev.${short_sha}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -59,7 +55,6 @@ jobs:
|
|||||||
VCS_REF=${{ github.sha }}
|
VCS_REF=${{ github.sha }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.dev_tag }}
|
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.version=${{ steps.version.outputs.value }}
|
org.opencontainers.image.version=${{ steps.version.outputs.value }}
|
||||||
org.opencontainers.image.revision=${{ github.sha }}
|
org.opencontainers.image.revision=${{ github.sha }}
|
||||||
|
|||||||
@@ -29,18 +29,16 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
if [[ ! "$version" =~ ^[0-9a-f]{12}$ ]]; then
|
||||||
echo "Invalid VERSION value: $version" >&2
|
echo "Invalid git hash version: $version" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker_tag="${version//+/-}"
|
|
||||||
|
|
||||||
echo "value=$version" >> "$GITHUB_OUTPUT"
|
echo "value=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "docker_tag=$docker_tag" >> "$GITHUB_OUTPUT"
|
echo "docker_tag=$version" >> "$GITHUB_OUTPUT"
|
||||||
echo "release_tag=v$docker_tag" >> "$GITHUB_OUTPUT"
|
echo "release_tag=v$version" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
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:
|
services:
|
||||||
portfolio:
|
portfolio:
|
||||||
image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG}
|
image: docker.lechner-systems.at/lechnersystems/maintenance:${IMAGE_TAG:-latest}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- path: .env
|
||||||
|
required: false
|
||||||
dns:
|
dns:
|
||||||
- 192.168.100.2
|
- 192.168.100.2
|
||||||
- 192.168.100.6
|
- 192.168.100.6
|
||||||
ports:
|
ports:
|
||||||
- ${MAIN_PORT}:80
|
- "${MAIN_PORT:-8080}:80"
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
<a href="tel:+436609254001">+43 660 9254001</a>
|
<a href="tel:+436609254001">+43 660 9254001</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<footer class="site-footer">
|
||||||
|
Lechner-Systems © <a href="https://fraujulian.xyz/imprint">Impressum</a>
|
||||||
|
</footer>
|
||||||
<script src="script.js"></script>
|
<script src="script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ body {
|
|||||||
padding: 96px 24px;
|
padding: 96px 24px;
|
||||||
font: 20px Helvetica, sans-serif;
|
font: 20px Helvetica, sans-serif;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@@ -59,6 +62,13 @@ a:focus {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-footer {
|
||||||
|
margin-top: auto;
|
||||||
|
padding-top: 48px;
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
@-moz-keyframes spin {
|
@-moz-keyframes spin {
|
||||||
100% {
|
100% {
|
||||||
-moz-transform: rotate(360deg);
|
-moz-transform: rotate(360deg);
|
||||||
|
|||||||
Reference in New Issue
Block a user