git - drone - ghost - guacamole - rocket chat
https://sigyl.com/
Giles Bradshaw
b017ca8b2e
continuous-integration/drone/push Build was killed
Details
|
||
---|---|---|
certificates | ||
drone-starlark | ||
ghost | ||
guacamole-postgresql | ||
letsencrypt-nginx | ||
ngrok-gitea | ||
.drone-do copy.star | ||
.drone-do.star | ||
.drone-home.star | ||
.drone-remote.star | ||
.drone.do.yml | ||
.drone.home.yml | ||
.drone.remote.yml | ||
.gitignore | ||
README.md | ||
add-secret.png | ||
build.sh | ||
docker-compose-do.yml | ||
docker-compose-drone.yml | ||
docker-compose-home.yml | ||
docker-compose-remote.yml | ||
init-mongo-chat.sh | ||
init-postgresql.sh | ||
init-scale.sh | ||
install.md | ||
letsencrypt-nginx-build.sh |
README.md
stack
In a docker stack.
static ip
- home - https://sigyl.com/
- git - https://sigyl.com/git/
- drone - https://sigyl.com:5000/
- ghost - https://sigyl.com/blog/
- guacamole - https://sigyl.com/remote/
- chat - https://sigyl.com/chat/
drone.do.yml - docker-compose-do.yml
tunnelled with ngrok
(very slow if home internet)
- git - https://git.sigyl.com/
- drone - https://drone.sigyl.com/
- guacamole - https://remote.sigyl.com/
installation
Once installed and running the system can redeploy itself.
However initially you need to do this yourself.
you need a docker swarm set up with nodes with the following labels
- com.sigyl.git-stack=yes
- com.sigyl.git-stack-data=yes
make a folder and give yourself access
sudo mkdir /stack
sudo chown -R $USER:$USER
cd /stack
clone the repository
cd /stack
git clone https://sigyl.com/git/giles/stack.git deploy
cd deploy
git checkout home-deploy
make certificates for the registry
these certificates will be in .ca and .certificates where $REGISTRY_DOMAIN is the host where the stack will run.
cd certificates
sh ca.sh $REGISTRY_DOMAIN:5003
sh make-cert.sh $REGISTRY_DOMAIN registry
make environment variables
export CERTBOT_EMAIL=giles.bradshaw@sigyl.com
export DRONE_DOMAIN=drone.git.sigyl.com
export DRONE_GITEA_CLIENT_ID=
export DRONE_GITEA_SERVER=
export DRONE_SERVER_HOST=drone.git.sigyl.com
export GIT_DOMAIN=git.sigyl.com
export LOCAL_DOCKER_REGISTRY=git.local-domain:5003/
export SSH_USER=giles
export GUACAMOLE_POSTGRES_DB=guacamole_db
export GUACAMOLE_POSTGRES_USER=guacamole_user
export DRONE_CONVERT_SECRET=topsecret
export DRONE_GITEA_CLIENT_SECRET=
export DRONE_RPC_SECRET=topsecret2
export GUACAMOLE_POSTGRES_PASSWORD=[passwordnospaces]
export NGROK_AUTH_TOKEN=[secret token from ngrok]
build images
where $STACK_HOME = /stack/deploy
sh build.sh $STACK_HOME
initial deploy of stack
cd /stack/deploy
docker stack deploy -c docker-compose-home.yml stack
initialise postgres database
find postgres id as $ID
docker ps | grep stack_guacamole-postgresql.1
sh init-postgresql.sh $ID
initialise mongo
get mongo id as $ID
docker ps | grep stack_chat-mongo.1
sh init-mongo-chat.sh $ID
scale chat and ngrok and nginx
sh init-scale.sh stack
create a gitea drone application
set environment variables as follows (example values):
export DRONE_GITEA_SERVER=https://sigyl.com/git
export DRONE_GITEA_CLIENT_ID=38218ed5-cf18-47e7-1234-710173dae499
export DRONE_GITEA_CLIENT_SECRET=ytsgdyXI_6zUrqwsI1wsssBAaUcsp27EyecT4nk5fA=