From ceec13aaee8e25fde48a9469f9fead80b8973c80 Mon Sep 17 00:00:00 2001 From: Lieuwe Leene Date: Fri, 18 Nov 2022 11:05:32 +0100 Subject: [PATCH] serve static files using nginx --- docker-compose.yaml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 2328a62..4ddc127 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,11 +1,29 @@ -version: "3.5" +version: "3.8" + +networks: + internalnet: + driver: bridge + enable_ipv6: false + +x-mail: &defaults + env_file: local.env + networks: + - internalnet services: - blog: - container_name: personal-blog + + hugo-site: + <<: *defaults + container_name: hugo-site + build: ./config/hugo image: nginx:alpine + environment: + - VIRTUAL_HOST=lieuwe.${NGINX_HOST} + - VIRTUAL_PORT=6262 + - VIRTUAL_PROTO=http + - LETSENCRYPT_HOST=lieuwe.${NGINX_HOST} volumes: - - ./config/hugo/public:/usr/share/nginx/html:ro,z + - ./config/hugo/configure:/etc/nginx/templates/default.conf.template:ro,z restart: always - ports: - - 6262:80 + expose: + - "6262"