-
Notifications
You must be signed in to change notification settings - Fork 0
Production Environment
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:
Change the .env file in the solution to include the following values:
POSTGRES_PASS = moduleteamPOSTGRES_HOST = host.docker.internal
- From client folder:
docker build -t reactapp . - From server folder:
docker build -t simapp . - From the root folder run :
docker-compose up -d
Create a folder on your disk to house the docker images
docker save -o reactapp reactappdocker save -o simapp simapp
"mana" is the name of a user on the production server. Before this stage, you have to have a user created on the server for you that also includes your ssh public key for authentication. Then replace "mana" with your own username and run the following commands:
scp reactapp mana@edusim.ca:dimagesscp simapp mana@edusim.ca:dimages
sudo docker load < reactappsudo docker load < simapp
$. sudo docker-compose up -d