Author: Cameron Zuziak
Date: 1/31/2022
-
Update your instance:
sudo apt-get update
-
Install docker compose:
sudo apt-get install docker-compose
-
Clone this repopsitory:
git clone https://github.com/cameronzuziak/WebAppTemplate.git
-
CD into the cloned directory and open the docker-compose.yml file in either vim or nano:
cd WebAppTemplate/ nano docker-compose.yml
-
Change the enviroment variable SERVER_NAME from 0.0.0.0 to the public IPv4 of your instance. then save and exit.
-
Change back to the projects main directory:
cd ../
-
Build your containers and run them, a few ways to do this.
sudo docker-compose build
sudo docker-compose up
-
or combine the 2 commands with the build arg:
sudo docker-compose up --build
-
or if you want to build and run in the background:
sudo docker-compose up --build -d