diff --git a/.dockerignore b/.dockerignore index 4339fc5..289d1cd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,7 @@ node_modules docker +.git Dockerfile .dockerignore +.gitignore README.md diff --git a/README.md b/README.md index 725b0e4..a74e008 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Alley-HSBC-Frontend -## Build docker image from docker file +## Build docker image from Dockerfile 1. cd into the root of this repository. 2. On Windows * run `docker build --tag .` @@ -11,10 +11,10 @@ Where `` is the name you give to the image. ## Deploy in docker (docker-compose) -1. Deploy using [docker-compose](/docker/docker-compose.yml). +1. Deploy using [docker-compose.yml](/docker/docker-compose.yml). 2. Make sure both docker and docker-compose are installed. 3. If you pull image teamalley/digital-walkaround from dockerhub - * You need to first login to dockerhub by running `docker login` command. The Username and LoginToken are provided under files in docker directory + * You need to first login to dockerhub by running `docker login` command. The Username and LoginToken are provided under files in the "docker" directory If you built your own image * Please Replace the image name in "docker-compose.yml" with `` @@ -23,7 +23,10 @@ 5. * run `docker-compose up -d` to start the service. * run `docker-compose down` to stop the service 6. You can access it on port 8080 by default. To change the port number, edit docker-compose.yml. Under ports, replace `8080:8080` with `:8080`. Then stop the service and start it again. -7. Node: you may exprience issues running the container in machines with limited ram. If the container restarts unexpectedly, try running `docker-compose up` without `-d` option to show the error messages. +7. Node: you may exprience issues running the container on machines with limited ram. + * If you are running this container on a server with 2-3 GiB of ram, you need to uncomment the two "environment" lines that sets "--max-old-space-size=1536" to allow node to allocate up to 1.5 GiB of ram. Also make sure there are no other programs on your system that requires lots of ram. \ + You should not run this container on machines with less than 2 GiB of ram + * If the container restarts unexpectedly, try running the container with `docker-compose up` without `-d` option to show the error messages. ## Deploy directly on a Server If You prefer installing it directly or you are expriencing some issues with the docker container. diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e0be75d..8ba4be0 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -3,6 +3,8 @@ services: digital-walkaround: image: teamalley/digital-walkaround container_name: digital-walkaround +# environment: +# - NODE_OPTIONS="--max-old-space-size=1536" ports: - 8080:8080 restart: unless-stopped \ No newline at end of file