Skip to content

Instantly share code, notes, and snippets.

@mazz
Last active Feb 15, 2021
Embed
What would you like to do?
jekyll deploy static site
## jekyll deploy
adduser jekyll
adduser jekyll sudo
su jekyll ; cd /home
mkdir ~/.ssh ; cd .ssh
cat >> ~/.ssh/authorized_keys
ssh-rsa <pubkey>
sudo chmod 700 -R ~/.ssh && chmod 600 ~/.ssh/authorized_keys
mkdir -p /home/jekyll/static/my_app
### dev machine, copy cwd of static files up to site
scp -r * -i ~/.ssh/id_rsa_mby.pem jekyll@myapp.xyz:/home/jekyll/static/my_app
ssh -i ~/.ssh/id_rsa_mby.pem jekyll@198.211.104.172
cd static/
# jekyll/docker-compose.yml
cp docker-compose.yml my_app/
cd my_app/
sudo docker-compose up
version: '3'
services:
jekyll:
image: jekyll/jekyll:latest
command: >
bash -c "/bin/chown -R jekyll /srv/jekyll
&& jekyll serve --port 3000 --watch --force_polling --verbose"
ports:
- 3000:3000
volumes:
- .:/srv/jekyll
networks:
- proxy-network
labels:
- "traefik.enable=true"
- "traefik.port=3000"
- "traefik.http.routers.markably-app.entrypoints=http"
- "traefik.http.routers.markably-app.rule=Host(`markably.app`)"
- "traefik.http.middlewares.markably-app-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.markably-app.middlewares=markably-app-https-redirect"
- "traefik.http.routers.markably-app-secure.entrypoints=https"
- "traefik.http.routers.markably-app-secure.rule=Host(`markably.app`)"
- "traefik.http.routers.markably-app-secure.tls=true"
- "traefik.http.routers.markably-app-secure.tls.certresolver=http"
- "traefik.http.routers.markably-app-secure.service=markably-app"
- "traefik.http.services.markably-app.loadbalancer.server.port=3000"
- "traefik.docker.network=proxy-network"
networks:
proxy-network:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment