Merge pull request #79 from CPSC319-Winter-term-2/docker-file
changed docker-compose and readme
This commit is contained in:
commit
d6df4b48bd
@ -1,5 +1,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
docker
|
docker
|
||||||
|
.git
|
||||||
Dockerfile
|
Dockerfile
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
.gitignore
|
||||||
README.md
|
README.md
|
||||||
|
|||||||
11
README.md
11
README.md
@ -1,7 +1,7 @@
|
|||||||
# Alley-HSBC-Frontend
|
# Alley-HSBC-Frontend
|
||||||
|
|
||||||
|
|
||||||
## Build docker image from docker file
|
## Build docker image from Dockerfile
|
||||||
1. cd into the root of this repository.
|
1. cd into the root of this repository.
|
||||||
2. On Windows
|
2. On Windows
|
||||||
* run `docker build --tag <image-name> .`
|
* run `docker build --tag <image-name> .`
|
||||||
@ -11,10 +11,10 @@
|
|||||||
|
|
||||||
Where `<image-name>` is the name you give to the image.
|
Where `<image-name>` is the name you give to the image.
|
||||||
## Deploy in docker (docker-compose)
|
## 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.
|
2. Make sure both docker and docker-compose are installed.
|
||||||
3. If you pull image teamalley/digital-walkaround from dockerhub
|
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
|
If you built your own image
|
||||||
* Please Replace the image name in "docker-compose.yml" with `<image-name>`
|
* Please Replace the image name in "docker-compose.yml" with `<image-name>`
|
||||||
@ -23,7 +23,10 @@
|
|||||||
5. * run `docker-compose up -d` to start the service.
|
5. * run `docker-compose up -d` to start the service.
|
||||||
* run `docker-compose down` to stop 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 `<the port number you want>:8080`. Then stop the service and start it again.
|
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 `<the port number you want>: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
|
## Deploy directly on a Server
|
||||||
If You prefer installing it directly or you are expriencing some issues with the docker container.
|
If You prefer installing it directly or you are expriencing some issues with the docker container.
|
||||||
|
|||||||
@ -3,6 +3,8 @@ services:
|
|||||||
digital-walkaround:
|
digital-walkaround:
|
||||||
image: teamalley/digital-walkaround
|
image: teamalley/digital-walkaround
|
||||||
container_name: digital-walkaround
|
container_name: digital-walkaround
|
||||||
|
# environment:
|
||||||
|
# - NODE_OPTIONS="--max-old-space-size=1536"
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
Reference in New Issue
Block a user