Compare commits
No commits in common. "b52d657" and "4ef6295" have entirely different histories.
@ -1 +0,0 @@
|
|||||||
*
|
|
||||||
120
.drone.yml
120
.drone.yml
@ -1,120 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: main
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Fetch tags
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- git fetch --tags
|
|
||||||
- name: Update version and changelog
|
|
||||||
image: registry.riba-interactive.de/conventi:0.1.0
|
|
||||||
- name: Commit changelog updates
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- git add .
|
|
||||||
- git commit -m "version and changelog update [CI SKIP]"
|
|
||||||
- git push origin $DRONE_TARGET_BRANCH
|
|
||||||
- name: Tag commit
|
|
||||||
image: registry.riba-interactive.de/conventi:0.1.0
|
|
||||||
commands:
|
|
||||||
- export VERSION=$(conventi.sh get_version)
|
|
||||||
- git tag -am "Tagging new version $VERSION" "$VERSION"
|
|
||||||
- git push origin "$VERSION"
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- dockerconfig
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: tag
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Build release
|
|
||||||
image: docker:dind
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
environment:
|
|
||||||
DOCKER_USER:
|
|
||||||
from_secret: docker_user
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: docker_password
|
|
||||||
commands:
|
|
||||||
- sleep 5 # give docker enough time to start
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin registry.riba-interactive.de
|
|
||||||
- docker pull registry.riba-interactive.de/statically:latest || true
|
|
||||||
- DOCKER_BUILDKIT=1 docker build --cache-from registry.riba-interactive.de/statically:latest --tag registry.riba-interactive.de/statically:latest .
|
|
||||||
- docker tag registry.riba-interactive.de/statically:latest registry.riba-interactive.de/statically:$DRONE_TAG
|
|
||||||
- docker push --all-tags registry.riba-interactive.de/statically
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
services:
|
|
||||||
- name: docker
|
|
||||||
image: docker:dind
|
|
||||||
privileged: true
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- dockerconfig
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: Build and Test
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Build image
|
|
||||||
image: docker:dind
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
environment:
|
|
||||||
DOCKER_USER:
|
|
||||||
from_secret: docker_user
|
|
||||||
DOCKER_PASSWORD:
|
|
||||||
from_secret: docker_password
|
|
||||||
commands:
|
|
||||||
- sleep 5 # give docker enough time to start
|
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USER --password-stdin registry.riba-interactive.de
|
|
||||||
- docker pull registry.riba-interactive.de/statically:latest || true
|
|
||||||
- DOCKER_BUILDKIT=1 docker build --cache-from registry.riba-interactive.de/statically:latest --tag registry.riba-interactive.de/statically:latest .
|
|
||||||
- docker tag registry.riba-interactive.de/statically:latest registry.riba-interactive.de/statically:build-$DRONE_BUILD_NUMBER
|
|
||||||
- docker push --all-tags registry.riba-interactive.de/statically
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- develop
|
|
||||||
- feature/*
|
|
||||||
- bugfix/*
|
|
||||||
|
|
||||||
services:
|
|
||||||
- name: docker
|
|
||||||
image: docker:dind
|
|
||||||
privileged: true
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
temp: {}
|
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
- dockerconfig
|
|
||||||
...
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.0.0",
|
|
||||||
"sha": "",
|
|
||||||
"url": "https://git.riba-interactive.de/rick/statically"
|
|
||||||
}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit guidelines.
|
|
||||||
|
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
31
Dockerfile
31
Dockerfile
@ -1,31 +0,0 @@
|
|||||||
FROM alpine:3.16.0 AS builder
|
|
||||||
|
|
||||||
ARG THTTPD_VERSION=2.29
|
|
||||||
|
|
||||||
RUN apk add gcc musl-dev make
|
|
||||||
RUN wget http://www.acme.com/software/thttpd/thttpd-${THTTPD_VERSION}.tar.gz \
|
|
||||||
&& tar xzf thttpd-${THTTPD_VERSION}.tar.gz \
|
|
||||||
&& mv /thttpd-${THTTPD_VERSION} /thttpd
|
|
||||||
RUN cd /thttpd \
|
|
||||||
&& ./configure \
|
|
||||||
&& make CCOPT='-O2 -s -static' thttpd
|
|
||||||
|
|
||||||
RUN adduser -D www --home /var/www
|
|
||||||
|
|
||||||
|
|
||||||
FROM scratch
|
|
||||||
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
COPY --from=builder /etc/passwd /etc/passwd
|
|
||||||
COPY --from=builder /thttpd/thttpd /usr/local/bin/
|
|
||||||
|
|
||||||
USER www
|
|
||||||
WORKDIR /var/www/htdocs
|
|
||||||
|
|
||||||
# Copy the static website
|
|
||||||
# Use the .dockerignore file to control what ends up inside the image!
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Run thttpd
|
|
||||||
CMD ["/usr/local/bin/thttpd", "-D", "-h", "0.0.0.0", "-p", "3000", "-d", "/var/www/htdocs", "-u", "www", "-l", "-", "-M", "60"]
|
|
||||||
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2022 Rick Barenthin. All Rights Reserved.
|
Copyright (c) year copyright holder. All Rights Reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user