diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..2caf28b --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,22 @@ +when: + branch: main + event: push + +variables: + - &repo git.hackmi.ch/phil/${CI_REPO_NAME} + +steps: + publish: + image: docker.io/woodpeckerci/plugin-docker-buildx:latest + settings: + platforms: linux/amd64 + repo: *repo + registry: git.hackmi.ch + tags: latest + username: + from_secret: git-package-user + password: + from_secret: git-package-pw + when: + branch: main + event: push \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c90f0db --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM nginx:alpine + +LABEL maintainer="Phil " +LABEL description="Docker image for TFTP server using dnsmasq" + +EXPOSE 80/tcp + +VOLUME /log +VOLUME /assets + +COPY conf/nginx.conf /etc/nginx/nginx.conf +COPY conf/default /config/nginx/site-confs/default + +RUN mkdir -p /assets && mkdir -p /log +RUN touch /log/access.log && touch /log/error.log +RUN chown -R nginx:nginx /assets +RUN chown -R nginx:nginx /log \ No newline at end of file diff --git a/conf/default b/conf/default new file mode 100644 index 0000000..8e89e16 --- /dev/null +++ b/conf/default @@ -0,0 +1,7 @@ +server { + listen 80; + location / { + root /assets; + autoindex on; + } +} \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf new file mode 100644 index 0000000..f316521 --- /dev/null +++ b/conf/nginx.conf @@ -0,0 +1,23 @@ +worker_processes 4; +pid /run/nginx.pid; +include /etc/nginx/modules/*.conf; + +events { + worker_connections 768; +} + +http { + access_log /log/access.log; + error_log /log/error.log; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + client_max_body_size 0; + include /etc/nginx/mime.types; + default_type application/octet-stream; + gzip on; + gzip_disable "msie6"; + include /config/nginx/site-confs/*; +} \ No newline at end of file