https://github.com/loldruger/nginx-docker-ssl-template
[WIP]This template runs on Rust axum as backend with nginx, postgres and redis over automatical SSL setup!
https://github.com/loldruger/nginx-docker-ssl-template
backend docker letsencrypt ngnix postgres redis reverse-proxy rust sqlx ssl template tokio
Last synced: 1 day ago
JSON representation
[WIP]This template runs on Rust axum as backend with nginx, postgres and redis over automatical SSL setup!
- Host: GitHub
- URL: https://github.com/loldruger/nginx-docker-ssl-template
- Owner: loldruger
- Created: 2023-03-24T18:40:13.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-15T15:33:17.000Z (6 months ago)
- Last Synced: 2025-04-08T07:12:37.962Z (3 months ago)
- Topics: backend, docker, letsencrypt, ngnix, postgres, redis, reverse-proxy, rust, sqlx, ssl, template, tokio
- Language: Shell
- Homepage:
- Size: 77.1 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An Easy-Deployable Web Backend Server Infrastructure Kit
## IntroductionThis template provides a ready-to-use foundation for your web backend, featuring `Nginx`, `PostgreSQL`, and `PGAdmin`, all secured with `Let's Encrypt SSL`. It simplifies the deployment process and allows you to focus on building your application.
# Getting Started
## Prerequisite:
1. You need to setup DNS config
2. Set .env file to yours.env:
```bash
#services
SERVICES="
api: api.example.org:8080,
web: example.org:8081,
pga: pga.example.org:9090
"#certbot
STAGING="true" #Set it to "true" for testing
EMAIL="[email protected]"
DOMAINS="" #automatically filled out when executing ./deploy.sh#postgres && pg-admin
POSTGRES_DATABASE="example_db"
POSTGRES_PASSWORD="example_password"PGADMIN_DEFAULT_EMAIL="[email protected]"
PGADMIN_DEFAULT_PASSWORD="example_password"
``````sh
curl -sSL https://install.python-poetry.org | python3 -
export PATH="/root/.local/bin:$PATH"poetry run python x.py
```3. **Deploy your services:**
```
$ sh deploy.sh
```on your terminal. it will automatically set up everything.
if you get successful result but cannot access through your domain, `$ docker compose restart nginx` to reload `nginx service`
# Troubleshooting
1. If you encounter an error during the certbot phase, such as `Certbot failed to authenticate some domains... Fetching Connection refused`, Verify that the file `/data/etc/letsencrypt/ssl-dhparams.pem` is not empty.
if it is, clean up your docker network and data files, then proceed with the second step below.2. If you get troubles on internet connection in container, uncomment the network configurations at the end of the `docker-compose.yaml` file, which set the MTU length to 1450 or another value.
# Roadmap
1. Support multi-repo configuration.
2. Adopt `Ansible` to configure multiple host servers.
3. Adopt `Jenkins` to build CI/CD pipeline
4. Improve error handling and logging.