From 5550e1e29ea19c93f251709741c6797b8650bfe9 Mon Sep 17 00:00:00 2001 From: Pierre Martin Date: Sat, 14 Oct 2023 17:04:37 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20outils=20de=20d=C3=A9ploiement=20?= =?UTF-8?q?et=20d=C3=A9v?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 12 ++++++++++++ Makefile | 7 +++++++ captain-definition | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 captain-definition diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5619aa3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# See https://lipanski.com/posts/smallest-docker-image-static-website +FROM busybox:1.36 + +RUN adduser -D static +USER static +WORKDIR /home/static + +COPY . . + +# Run BusyBox httpd +EXPOSE 3000 +CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"] \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..22922b7 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +start: + npx live-server . --port=3131 + +# In case of certificate error: `docker service update captain-registry --force` +# see https://github.com/caprover/caprover/issues/1693 +deploy: + npx caprover deploy -a jeu-laser -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" +}