Skip to content

Production Environment

Mana Azarm edited this page Aug 24, 2021 · 21 revisions

For production environment, we create a docker image of the client side app and a separate image for the server side app. Then, we run these images through the docker-compose.yml file placed in the root directory. Finally, we save the docker files; transfer the two images to the production server, and rebuild the docker images on the server. The following instructions guide you through all these steps in bash commands: Post to production:

Step 0:

Change the .env file in the solution to include the following values: POSTGRES_PASS = moduleteam \n POSTGRES_HOST = host.docker.internal

Step1: generate docker images

  1. From client folder: docker build -t reactapp .
  2. From server folder: docker build -t simapp .
  3. From the root folder run : docker-compose up -d

Step2: save images from the folder you want them to be saved

  1. docker save -o reactapp reactapp
  2. docker save -o simapp simapp

Step3: send images to server

  1. scp reactapp mana@edusim.ca:dimages
  2. scp simapp mana@edusim.ca:dimages

Step4: load the images on the server

  1. sudo docker load < reactapp
  2. sudo docker load < simapp

Clone this wiki locally