Skip to content

IgorNadj/dev-webserver

Repository files navigation

Dev Server

Setup:

Manual:

  1. create ec2 instance
    1. (ubuntu, username: ubuntu)
    2. install docker (official)
    3. git clone this repo into /home/ubuntu/dev-webserver
    4. add user to docker group sudo usermod -aG docker ubuntu
    5. re-log in
    6. docker login
    7. run it (see Run below)

Set up GitHub redeploy

  1. In Docker Hub
    1. Generate an Access Token
    2. Add it to ~/.docker-hub-secret
  2. ssh in
    1. ssh-keygen -t ed25519 -C "your_email@example.com"
    2. Copy pub key
  3. In Github Settings > Secrets and variables > Actions:
    1. Add DEV_SERVER_SSH_KEY
    2. Set up GHA ssh redeploy workflow

Tailscale exit node setup (host install)

  1. Install Tailscale on the EC2 host:
    • curl -fsSL https://tailscale.com/install.sh | sh
  2. Bring it up and advertise as an exit node:
    • sudo tailscale up --advertise-exit-node
  3. In the Tailscale admin console, approve the device as an exit node.
  4. Ensure IP forwarding + NAT is enabled on the host (required for exit nodes).

Run

  • 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/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors