Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidcardoso/terraform-aws-web-app-over-ec2
Template for a Web App served by AWS EC2 and related resources.
https://github.com/davidcardoso/terraform-aws-web-app-over-ec2
aws infrastructure-as-code terraform
Last synced: 21 days ago
JSON representation
Template for a Web App served by AWS EC2 and related resources.
- Host: GitHub
- URL: https://github.com/davidcardoso/terraform-aws-web-app-over-ec2
- Owner: DavidCardoso
- Created: 2024-05-20T15:28:26.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-23T21:11:49.000Z (9 months ago)
- Last Synced: 2024-11-13T20:28:17.158Z (3 months ago)
- Topics: aws, infrastructure-as-code, terraform
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# App over AWS EC2
- [App over AWS EC2](#app-over-aws-ec2)
- [Requisites](#requisites)
- [Environment variables](#environment-variables)
- [For the app (and local setup)](#for-the-app-and-local-setup)
- [For the infrastructure (_i.e._, Terraform)](#for-the-infrastructure-ie-terraform)
- [Local development](#local-development)
- [Terraform](#terraform)
- [Useful commands](#useful-commands)
- [Accessing the `app` container](#accessing-the-app-container)
- [Seeing logs](#seeing-logs)
- [Running a specific command inside the container](#running-a-specific-command-inside-the-container)
- [Contributors](#contributors)## Requisites
- [Docker](https://docs.docker.com/get-docker/): for local development
- [Hashicorp Terraform](https://www.terraform.io/): for infra as code management## Environment variables
### For the app (and local setup)
See [.env-example](/.env-example)
### For the infrastructure (_i.e._, Terraform)
See [infra/terraform/.auto.tfvars](/infra/terraform/.auto.tfvars)
## Local development
```shell
# run locally in dev mode
# local files are mounted inside the container
./start.sh# optionally, you can edit the .env file as needed
# create the .env file
cp .env-example .env
vim .env
```> By default, the app will be available on `http://localhost:8080`
> See more about the docker configs in [infra/docker/development/](/infra/docker/development/) folder
## Terraform
See more in [infra/terraform/README.md](/infra/terraform/README.md)
## Useful commands
### Accessing the `app` container
```shell
docker compose exec app /bin/bash
```### Seeing logs
```shell
docker compose logs app# or
docker compose logs --tail=all -f | grep app
```### Running a specific command inside the container
```shell
docker compose exec app pwd
# /srv/app # check the default working dir in `docker-compose.yml` file
```## Contributors
- [@DavidCardoso](https://github.com/DavidCardoso)