-
Notifications
You must be signed in to change notification settings - Fork 0
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:
#Step1: generate docker images
- From client folder:
docker build -t reactapp . - From server folder:
docker build -t simapp . - run :
docker-compose up -d
#Step2: save images from the folder you want them to be saved
docker save -o reactapp reactappdocker save -o simapp simapp
#Step3: send images to server
scp reactapp mana@edusim.ca:dimagesscp simapp mana@edusim.ca:dimages
#Step4: load the images on the server
sudo docker load < reactappsudo docker load < simapp