From e4dc4caf889afbd13a6c9b75a7a2c15d99d8c65b Mon Sep 17 00:00:00 2001 From: Mika Hietanen Date: Wed, 27 Nov 2024 08:47:57 +0200 Subject: [PATCH] Update Docker Compose configuration Also update README --- .dockerignore | 1 - README.md | 13 +++++++++++-- docker-compose.yml | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index cfdff5982..a2047d9fd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,6 @@ node_modules/ dist/ build/ -.env .env.example .travis.yml .docker-compose.yml diff --git a/README.md b/README.md index da240c428..db9d8d7fb 100755 --- a/README.md +++ b/README.md @@ -38,19 +38,28 @@ Launches Jest test runner.
Launches TestCafe test runner and performs browser tests on headless chrome.
### `npm run browserTestCLI` -Launches the application using `node dist` command and then launches TestCafe test runner in headless mode. Mainly used by Travis CI. +Launches the application using `node dist` command and then launches TestCafe test runner in headless mode. Mainly used in GitHub Actions. ## How to use For development: - Make sure npm packages are installed by running `npm install --legacy-peer-deps`in project root. - Make sure you have environment variables set. `.env.example` should have all required values so you can copy it to `.env`. - Then you can start development server using `npm run dev`. Which watches files and updates on code changes. +- Open the application by loading `localhost:2048` in the browser To run in production mode: - Make sure npm packages are installed by running `npm install --legacy-peer-deps`in project root. - Make sure you have environment variables set. `.env.example` should have all required values so you can copy it to `.env`. - Build files by running `npm run build` -- Then you can just run the app with `npm start` +- Then you can run the app with `npm start` +- Open the application by loading `localhost:2048` in the browser + +To run with docker compose: +- Install Docker if not installed, check that port `2048` is free, not occupied by running server. +- Make sure you have environment variables set. `.env.example` should have all required values so you can copy it to `.env`. +- Run `docker compose up` +- Open the application by loading `localhost:2048` in the browser + ## Environment variables This is a documentation (some day hopefully exhaustive) of environment variables and how to use them. diff --git a/docker-compose.yml b/docker-compose.yml index 11aa61080..6e75a31eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,5 @@ -version: "3.8" services: - web: + app: build: . ports: - "2048:2048"