Route a subdomain thru nginx to docker
Set proxy for a docker service thru subdomain. Subdomain: your.domain.com Docker Port: 9999 Edit docker-compose for an app you would like to proxy to. Add 127.0.0.1:9999, mapping it to a port in docker (here it’s 3000)
|
1 2 |
ports: - "127.0.0.1:9999:3000" |
Restart
|
1 2 |
docker compose down docker compose up -d |
Create nginx config, replacing 9999 and your.domain.com to docker port and subdomain of your choice.
|
1 |
sudo vim /etc/nginx/sites-available/your.domain.com |
[…]
Windrose dedicated server on Linux using Docker
Clone windrose-dedicated-server-docker
|
1 2 3 |
git clone https://github.com/UberDudePL/windrose-dedicated-server-docker.git cd windrose-dedicated-server-docker chmod +x ./windrose ./serverctl.sh |
Setup server It will ask you several questions, after which .env file will be created with your configuration.
|
1 |
./windrose setup |
Run server If you have not chosen it in the previous step.
|
1 |
./windrose start |
Status and logs
|
1 2 |
./windrose status ./windrose logs |
CertBot
Create Cert sudo certbot –nginx -d my.domain.com Renew with dry run sudo certbot renew –dry-run
nginx CheatSheet
Enable Site Reload sudo systemctl reload nginx
