From 8d5d7eb81a0de9040d9b4929bff7698dc70db65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Flusin?= Date: Thu, 11 Jun 2026 10:24:50 +0200 Subject: [PATCH] chore: dockerization --- docker-compose.yml | 11 +++++++++++ nginx.conf | 36 ++++++++++++++++++++++++++++++++++++ start.sh | 5 +++++ stop.sh | 4 ++++ 4 files changed, 56 insertions(+) create mode 100644 docker-compose.yml create mode 100644 nginx.conf create mode 100755 start.sh create mode 100755 stop.sh diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..bd65d58 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3" +services: + + nginx: + image: nginx:alpine + ports: + - "88:80" + restart: always + volumes: + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + - ./:/usr/share/nginx/html diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..d0532d6 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,36 @@ +charset utf-8; + +tcp_nopush on; +tcp_nodelay off; +client_header_timeout 10s; +client_body_timeout 10s; +client_max_body_size 20M; +reset_timedout_connection on; + +gzip on; +gzip_types + text/css + text/javascript + text/xml + text/plain + application/javascript + application/x-javascript + application/json + application/xml + application/rss+xml + application/atom+xml + font/truetype + font/opentype + image/svg+xml; + +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + + # To make sure any assets can get through :) + location / { + try_files $uri /index.html; + } +} + diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..04c2657 --- /dev/null +++ b/start.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -xe + +# launch docker +docker compose up -d diff --git a/stop.sh b/stop.sh new file mode 100755 index 0000000..1695f13 --- /dev/null +++ b/stop.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -xe + +docker compose down