An open API service indexing awesome lists of open source software.

https://github.com/sobekcore/side-projects-provider

Simple configuration to host multiple projects on a single AWS EC2 instance with a single domain and it's subdomains.
https://github.com/sobekcore/side-projects-provider

aws certbot docker ec2 nginx

Last synced: 2 months ago
JSON representation

Simple configuration to host multiple projects on a single AWS EC2 instance with a single domain and it's subdomains.

Awesome Lists containing this project

README

          

# Side Projects Provider
This repository contains many different infrastructure components to support hosting multiple side projects more easily. The setup is optimized towards minimal resource usage, and is proven to work just fine with 5+ services being deployed simultaneously on a single t3.nano EC2 instance.

Every command in this guide assumes that the repository will be cloned into `~/side-projects-provider`, and that the commands will be launched from `~/side-projects-provider/docker`.

## Prerequisites
1. Create memory swapfile (https://repost.aws/knowledge-center/ec2-memory-swap-file).
2. Add `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables to `~/.bash_profile`.
3. Run `chmod +x` on all scripts.

## Deployment
If all the services are described directly in `docker-compose.override.yml`, then the simple deployment process can be successfully conducted with:
```shell
docker compose up -d
```

If however the services are more complex and contain their own `docker-compose.yml` files, then proceed with creating `Makefile` based on `Makefile.example` template:
```shell
cp Makefile.example Makefile
```
and then deploy the services with:
```shell
make start
```

## SSL
To generate SSL certificate for the first time run:
```shell
make generate
```

To automatically renew SSL certificate add this schedule expression to `crontab -e`:
```shell
0 2 * * 0 make -C ~/side-projects-provider/docker renew
```