From 4cde37b521483a514ac511e2dcdb3443cdba9a3f Mon Sep 17 00:00:00 2001 From: Pierre Martin Date: Tue, 15 Oct 2024 23:08:30 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20d=C3=A9ploiement=20sur=20caprover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 13 +++++++++++++ Makefile | 2 +- captain-definition | 4 ++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 captain-definition diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6eeb175 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# See https://lipanski.com/posts/smallest-docker-image-static-website +FROM busybox:1.36 + +RUN adduser -D static +USER static +WORKDIR /home/static + +COPY favicon.ico . +COPY index.html . + +# Run BusyBox httpd +EXPOSE 3000 +CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"] \ No newline at end of file diff --git a/Makefile b/Makefile index 9375c69..478e7d7 100755 --- a/Makefile +++ b/Makefile @@ -2,4 +2,4 @@ dev: npx serve . deploy: - rsync -avzL --exclude Makefile --exclude .git . celine-pierrot@ssh-celine-pierrot.ethersys.host:www.pierre-martin.fr + npx caprover deploy -a pierre-martin -b main --default \ No newline at end of file diff --git a/captain-definition b/captain-definition new file mode 100644 index 0000000..0e14f82 --- /dev/null +++ b/captain-definition @@ -0,0 +1,4 @@ +{ + "schemaVersion": 2, + "dockerfilePath": "./Dockerfile" +}