Description:
The project contains the docker folder and the Dockerfile.
The Dockerfile is used to Deploy the project to Google Cloud.
The docker folder contains a couple of helper scripts:
-
docker-compose.yml(all our services: web, backend, db are described here) -
start-backend.sh(starts backend, but only after the database) -
wait-for-it.sh(imported from https://github.com/vishnubob/wait-for-it)To avoid breaking the application, we recommend you don't edit the following files: everything that includes the docker folder and
Dokerfile.Run services:
-
Install docker compose (https://docs.docker.com/compose/install/)
-
Move to
dockerfolder. All next steps should be done from this folder.cd docker -
Make executables from
wait-for-it.shandstart-backend.sh:chmod +x start-backend.sh && chmod +x wait-for-it.sh -
Download dependend projects for services.
-
Review the docker-compose.yml file. Make sure that all services have Dockerfiles. Only db service doesn't require a Dockerfile.
-
Make sure you have needed ports (see them in
ports) available on your local machine. -
Start services:
7.1. With an empty database
rm -rf data && docker-compose up7.2. With a stored (from previus runs) database data
docker-compose up -
Check http://localhost:3000
-
Stop services:
9.1. Just press
Ctr+C
-