Skip to content

Commit c9d7ae7

Browse files
committed
services/pkg: Add void nginx container
1 parent a8de1f6 commit c9d7ae7

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/pkg-nginx.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: NGINX Service Container
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: "Version tag"
7+
required: true
8+
9+
jobs:
10+
main:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@master
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v1
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v1
19+
- name: Login to GCHR
20+
uses: docker/login-action@v1
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Build and push
26+
id: docker_build
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: services/pkg/nginx
30+
push: true
31+
tags: "ghcr.io/void-linux/infra-nginx:${{ github.event.inputs.version }}"
32+
labels: |
33+
org.opencontainers.image.source=${{ github.repositoryUrl }}

services/pkg/nginx/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ghcr.io/void-linux/void-linux:latest-thin-x86_64
2+
3+
RUN xbps-install -Sy nginx tini
4+
5+
WORKDIR /srv/www
6+
COPY nginx.conf /etc/nginx/nginx.conf
7+
ENTRYPOINT ["/usr/bin/tini", "nginx"]

services/pkg/nginx/nginx.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
daemon off;
2+
user root;
3+
worker_processes 2;
4+
error_log stderr;
5+
6+
events {
7+
use epoll;
8+
worker_connections 128;
9+
}
10+
11+
http {
12+
server_tokens off;
13+
include mime.types;
14+
charset utf-8;
15+
access_log /dev/stdout;
16+
17+
server {
18+
server_name _;
19+
listen 0.0.0.0:80 default_server;
20+
21+
root /srv/www;
22+
23+
location / {
24+
autoindex on;
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)