From 934d6b1e01bbdc4aec70fed21b092fa9094c7257 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Thu, 17 Feb 2022 19:37:22 +0330 Subject: cargo --- terminaldweller.com/cargo/Dockerfile | 7 +++++++ terminaldweller.com/cargo/docker-compose.yaml | 15 +++++++++++++++ terminaldweller.com/cargo/nginx.conf | 14 ++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 terminaldweller.com/cargo/Dockerfile create mode 100644 terminaldweller.com/cargo/docker-compose.yaml create mode 100644 terminaldweller.com/cargo/nginx.conf diff --git a/terminaldweller.com/cargo/Dockerfile b/terminaldweller.com/cargo/Dockerfile new file mode 100644 index 0000000..6907039 --- /dev/null +++ b/terminaldweller.com/cargo/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.15 AS certbuilder +RUN apk update && apk add openssl +WORKDIR /certs +RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=localhost" -keyout server.key -out server.cert + +FROM nginx:mainline-alpine +COPY --from=certbuilder /certs/ /certs diff --git a/terminaldweller.com/cargo/docker-compose.yaml b/terminaldweller.com/cargo/docker-compose.yaml new file mode 100644 index 0000000..c8ca217 --- /dev/null +++ b/terminaldweller.com/cargo/docker-compose.yaml @@ -0,0 +1,15 @@ +version: "3" +services: + nginx: + image: nginx + context: . + networks: + - cargonet + ports: + - "7777:8080" + restart: unless-stopped + volumes: + - ./nginx.conf:/etc/nginx.conf:ro + - /home/ubuntu/cargo:/cargo +networks: + cargonet: diff --git a/terminaldweller.com/cargo/nginx.conf b/terminaldweller.com/cargo/nginx.conf new file mode 100644 index 0000000..4606586 --- /dev/null +++ b/terminaldweller.com/cargo/nginx.conf @@ -0,0 +1,14 @@ +http { + server { + listen 8080 ssl; + keepalive_timeout 70; + ssl_certificate /certs/server.cert; + ssl_certificate_key /certs/server.key; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + + location / { + root /cargo + } + } +} -- cgit v1.2.3