commit a923ec039a2300b03d99f9080e307d690675c1d4 Author: Adam French Date: Sat Nov 15 18:07:10 2025 +0000 init config diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9ea3787 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +services: + helloworld: + container_name: helloworld + image: crccheck/hello-world + expose: + - 8000 + + nginx: + container_name: nginx + restart: unless-stopped + image: nginx + ports: + - 80:80 + - 443:443 + volumes: + - ./nginx/nginx.conf:/etc/nginx/nginx.conf + - ./certbot/conf:/etc/letsencrypt + - ./certbot/www:/var/www/certbot + + certbot: + image: certbot/certbot + container_name: certbot + volumes: + - ./certbot/conf:/etc/letsencrypt + - ./certbot/www:/var/www/certbot + command: certonly --webroot -w /var/www/certbot --force-renewal --email adam.a.french@outlook.com -d adam-french.co.uk --agree-tos + + diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..54ae20a --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,22 @@ +events { + worker_connections 1024; +} + +http { + server_tokens off; + charset utf-8; + + server { + listen 80 default_server; + + server_name _; + + location ~ /.well-known/acme-challenge/ { + root /var/www/certbot; + } + + location / { + proxy_pass http://helloworld:8000/; + } + } +}