Before you start, make sure your EC2 instance has git
, docker
, and docker-compose
installed.
- Log into your EC2 instance
- Run
git clone https://github.com/raywenderlich/dockerized.git
- Update the
.env
file - Run
docker-compose pull
- Run
docker-compose up -d db
to start just PostgreSQL and let it complete it's first-launch initialization - After a few seconds, run
docker-compose up -d
to spin up the webapp
From then on you can simply use docker compose up -d
and docker compose down
to manage the state of the containers.