From 6abbc9d5ef1b8191bec7819438c8b5c8bbaf1f44 Mon Sep 17 00:00:00 2001 From: talksik Date: Mon, 14 Aug 2023 10:01:33 -0700 Subject: [PATCH] adding in initial nginx docker --- docker-compose.yaml | 27 +++++++++++++++++++++++++++ nginx.conf | 14 ++++++++++++++ src/index.html | 1 + 3 files changed, 42 insertions(+) create mode 100644 docker-compose.yaml create mode 100644 nginx.conf create mode 100644 src/index.html diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..afe3e81 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,27 @@ +version: '3.3' +networks: + nginx: +services: + nginx: + image: nginx:latest + restart: unless-stopped + container_name: caddy + ports: + - 5000:5000 # container registry + - 80:80 # kubernetes - hello world + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf + - ./src/index.html:/usr/share/nginx/html/index.html + networks: + - nginx + + registry: + image: registry:2 + restart: unless-stopped + container_name: registry + ports: + - 5000:5000 + volumes: + - /mnt/registry:/var/lib/registry + networks: + - nginx diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a0453ec --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +# nginx.conf for a basic web server +events {} + +http { + server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html; + } + } +} diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..f76d8e9 --- /dev/null +++ b/src/index.html @@ -0,0 +1 @@ +

Hello, World!