fermyon / bartholomew-site-template Goto Github PK
View Code? Open in Web Editor NEWA clone-able base site to help you get started quickly with Bartholomew
License: Creative Commons Zero v1.0 Universal
A clone-able base site to help you get started quickly with Bartholomew
License: Creative Commons Zero v1.0 Universal
I made a docker config to automatically have my site in a container. I'd be happy to provide a PR, or you can take what I have here:
cat Dockerfile
FROM ubuntu:latest
WORKDIR /root
RUN apt-get update && apt-get install -y vim curl git && rm -rf /var/lib/apt
RUN curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash && mv ./spin /usr/local/bin/
RUN VERSION=$(curl -so- https://github.com/fermyon/bartholomew/releases | grep 'href="/fermyon/bartholomew/releases/tag/v[0-9]*.[0-9]*.[0-9]*\"' | sed -E 's/.*\/fermyon\/bartholomew\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1) && curl -fsOL "https://github.com/fermyon/bartholomew/releases/download/${VERSION}/bart-cli-${VERSION}-linux-amd64.tar.gz" && tar -xvzf bart-cli*.tar.gz && mv ./bart /usr/local/bin/ && rm bart-cli*.tar.gz
EXPOSE 3000
COPY ./init.sh /root/init.sh
RUN chmod +x /root/init.sh
CMD /root/init.sh
cat docker-compose
version: '3.8'
services:
bart:
container_name: bart
build:
context: .
dockerfile: Dockerfile
volumes:
- ./ssh:/root/.ssh
environment:
- GIT_URL="git.sendthemtomir.com"
- GIT_PORT=10022
- GIT_REPO="/mbushey/bart-mir.git"
ports:
- "3000:3000"
cat init.sh
#!/bin/bash
if [ -z $GIT_URL ]; then
export GIT_URL=github.com
echo "ENV var GIT_URL not set. Setting to: '$GIT_URL'"
fi
if [ -z $GIT_PORT ]; then
export GIT_PORT=22
echo "ENV var GIT_PORT not set. Setting to: $GIT_PORT"
fi
if [ -z $GIT_REPO ]; then
export GIT_REPO="/fermyon/bartholomew-site-template.git"
echo "ENV var GIT_REPO not set. Setting to: '$GIT_REPO'"
fi
chmod 700 /root/.ssh
chmod 700 /root/.ssh/id_ed25519
if [ ! -f /root/.ssh/id_ed25519.pub ]; then
echo "SSH key not found, generating"
ssh-keygen -t ed25519 -C "bart" -f "/root/.ssh/id_ed25519" -q -N ""
echo "Please add this key as a read-only deploy key to your git repo:"
cat /root/.ssh/id_ed25519.pub
fi
## Recreate known_hosts ONLY if host does not exist in ~/.ssh/known_hosts
ssh-keygen -F "[${GIT_URL}]:${GIT_PORT}" || echo "Generating .ssh/known_hosts" && ssh-keyscan -p $GIT_PORT $GIT_URL > ~/.ssh/known_hosts
if [ ! -d bart ]; then
git clone ssh://git@${GIT_URL}:${GIT_PORT}${GIT_REPO} bart
if [ $? != 0 ]; then
echo "Clone failed."
echo "Make sure This key has perms to pull at $GIT_URL:"
cat /root/.ssh/id_ed25519.pub
fi
fi
cd bart
git pull
spin up --listen 0.0.0.0:3000
I haven't actually tried, but I assume these modules will need to be recompiled.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.