From cea7c5e91e9f3b128d954609b706e3108e0f7545 Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Thu, 8 Apr 2021 15:46:57 +0200 Subject: [PATCH] Add and document docker-compose file --- README.md | 9 ++++++++- docker-compose.yml | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index c22637b..e5a27f4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# New Project +# Helpful contact form ## How to start +### Using VSCode + You can use any editor you like, but the following instructions lead to a containerised dev environment using VSCode or Codium: @@ -20,6 +22,11 @@ Next: `Ctrl+P`, start typing: `Reopen in Container` and hit `Return`. You can now use any of the scripts defined in `package.json`, described below. +### Using any other editor + +You can run the development container manually like this: `docker-compose up`. +This will run `npm start` internally, exposed to port `8080` on localhost. + ## Available Scripts ### npm start diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7e5616b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.7" + +services: + nodejs: + build: + context: . + dockerfile: .devcontainer/Dockerfile + command: > + sh -c "pnpm install && + npm start" + volumes: + - .:/workspaces/outage-form + user: "1000:1000" + ports: + - "8080:8080" -- GitLab