From a4820a2792c97c9bd1b139af786ffe39e413e8d7 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 7 May 2020 21:45:52 -0500 Subject: [PATCH] feat: Docker compose (#1767) * Added docker-compose.yml file to replace Dockerfile. * Added instruction in the README.md on starting the docker-compose build. --- README.md | 8 ++++++++ docker-compose.yml | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index a0e30247..54e68436 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,14 @@ To build a Docker image for production: Now Pinafore is running at `localhost:4002`. +### docker-compose + +Alternatively, use docker-compose to build and serve the image for production: + + docker-compose up --build -d + +The image will build and start, then detach from the terminal running at `localhost:4002`. + ### Updating To keep your version of Pinafore up to date, you can use `git` to check out the latest tag: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..6b6c9ac6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +--- +version: "3" +services: + pinafore: + restart: unless-stopped + build: + context: . + dockerfile: Dockerfile + image: pinafore:latest + ports: + - 4002:4002