Dev Server
- create ec2 instance
- (ubuntu, username: ubuntu)
- install docker (official)
- git clone this repo into /home/ubuntu/dev-webserver
- add user to docker group
sudo usermod -aG docker ubuntu - re-log in
- docker login
- run it (see Run below)
- In Docker Hub
- Generate an Access Token
- Add it to ~/.docker-hub-secret
- ssh in
ssh-keygen -t ed25519 -C "your_email@example.com"- Copy pub key
- In Github
Settings > Secrets and variables > Actions:- Add
DEV_SERVER_SSH_KEY - Set up GHA ssh redeploy workflow
- Add
- Install Tailscale on the EC2 host:
curl -fsSL https://tailscale.com/install.sh | sh
- Bring it up and advertise as an exit node:
sudo tailscale up --advertise-exit-node
- In the Tailscale admin console, approve the device as an exit node.
- Ensure IP forwarding + NAT is enabled on the host (required for exit nodes).
- dev:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up - prod:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Then view the traefik dashboard at: http://<public ip>:8080/