Ansible template that shows how to create dynamic staging servers with ..com

Overview

Vagrant + Ansible + Docker Swarm + Trafeik + NGINX template

Template repo that creates virtual machines with Docker, Docker Swarm, Traefik, NGINX. It shows how easy you can create "feature branch" deployment on your VPS

Installation

Make sure that you have installed vagrant with libvirt plugin and ansible! Generate all env keys to access machine:

(cd keys/; ./generate-keys.sh)

Run vagrant and create vm (do not use --create-vm option if you want to only re-run ansible configure).

./start-dev.sh --create-vm

Edit you /etc/hosts on local machine and add these entries:

192.168.56.10 traefik.example.com
192.168.56.10 feature.example.com

And it works! You can enter these URLs:

Login: user
Password: 123456

http://traefik.example.com/dashboard/#/
http://feature.example.com/

Add your public key

Add your public key to keys/authorized/deploy/ folder and run ./start-dev.sh to access server via ssh [email protected].

Deploy new env script

Just run on [email protected]:

/var/www/staging/script/setup.mjs --name="ladybug"

and after deployment visit (edit /etc/hosts before):

http://ladybug.example.com/

Firewall

Project uses iptables. Find rules.v4 file to customize firewall.

nmap -Pn 192.168.56.10

Starting Nmap 7.80 ( https://nmap.org ) at 2022-09-21 15:40 CEST
Nmap scan report for traefik.example.com (192.168.56.10)
Host is up (0.00028s latency).
Not shown: 997 filtered ports
PORT    STATE SERVICE
22/tcp  open  ssh
80/tcp  open  http
443/tcp open  https

Nmap done: 1 IP address (1 host up) scanned in 4.75 seconds

Delete

./start-dev.sh --destroy-vm

License

MIT License

Copyright (c) 2022 Mateusz Bagiński

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...

Open-source continuous regression testing that you can self-host.

Open-source continuous regression testing that you can self-host.

Touca Touca helps you see the side-effects of your changes, as you write code. Touca SDKs let you describe the behavior and performance of your softwa

Dec 30, 2022

DropSpace is an easy way to self-host a file drop.

DropSpace is an easy way to self-host a file drop.

DropSpace Simple file sharing made in Laravel About DropSpace DropSpace is an easy way to self-host a file drop. Simply upload your file, and share th

Dec 9, 2022

Host your own replica server instantly on Glitch.

Earthstar Replica Server for Glitch Want your own replica server? Click the button above. Create a file at .data/known_shares.json Add the shares you'

Apr 26, 2022

A WASI implementation that uses VS Code's extension host as the implementing API

Project This repo has been populated by an initial template to help get you started. Please make sure to update the content to build a great experienc

Dec 24, 2022

🪶 An light weight image host built using typescript.

🪶 An light weight image host built using typescript.

Feather; an next-gen image uploader built to be used with sharex. Built using typescript, expressjs. To get started ( IN ORDER ) ~ Hosting ~ npm i ~ n

Jun 14, 2022

This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io)

This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io)

Alternative Prisma Data Proxy This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io). In order to deploy your project to

Dec 28, 2022

Deploys a AWS Bastion Host preconfigured for Tailscale access.

Deploys a AWS Bastion Host preconfigured for Tailscale access.

cdk-tailscale-bastion This packages creates an AWS Bastion configured for Tailscale. This covers steps 1,2 & 4 of the Tailscale RDS guide. You may fin

Dec 3, 2022

Deploy your uAdmin project and host it with a single click (and a few more steps 👀) !

Deploy your uAdmin project and host it with a single click (and a few more steps 👀) !

Golang and uAdmin CI/CD using 🚅 Railway! Steps to Deploy Make sure to create a Github account and link it with 🚅 Railway Click Give your new Reposit

Nov 13, 2022

Awsome-Books is an app that let you create a list of books by adding the book name and the author.

This app create a list of books, naming author and title. The lis of books is created dynamicly using javascrtipt, every time the user add a new book on the Add New Section. All the methods and fuctions are separated in modules and imported to the index.js file.

Jul 21, 2022
Owner
Mateusz Bagiński
🐱 Node / JS / TypeScript / Ruby on Rails developer. The cake is a lie.
Mateusz Bagiński
This project is created to store the name of the book and the name of its author, build with JavaScript.

awesome-books A plain javascript project that can keep track of a list of books utilizing localStorage. See live demo Built With HTML CSS Javascript T

Shaqayq Darwazi 3 Jul 19, 2022
This branch is created to make receive and send data to api using async and await methods

Microverse-Leader-Board Project from module 2 week 4 This branch is created to make receive and send data to api using async and await methods Screens

Akshitha Reddy 6 Apr 22, 2022
ScrapedDuck routinely scrapes LeekDuck.com and pushes the found data to a branch on this repository, for use by other external applications.

ScrapedDuck ScrapedDuck routinely scrapes LeekDuck.com (with permission) and pushes the found data to a branch on this repository, for use by other ex

Anthony 19 Dec 19, 2022
☁️ Publish your npm package to a GitHub repository branch

git-publish Publish your npm package to a Git branch. Support this project by ⭐️ starring and sharing it. Follow me to see what other cool projects I'

hiroki osame 28 Oct 21, 2022
In this project we made a Tv shows webpage where you can like or comment the different shows.

JS Capstone Project In this project we made a Tv shows webpage where you can like or comment the differents shows. Built With HTML CSS JavaScript Lint

Lucas Bonnefon 4 Mar 16, 2022
TV Shows Web App - A web application based on an external API which contains information about TV shows

TV Shows Web App - A web application based on an external API which contains information about TV shows. th web app let you like the shows that you like the most and comment what you think about them making use of an involvement API to save this interaction information.

Williams Colmenares 14 Dec 17, 2022
TV Shows Web App - A web application based on an external API which contains information about TV shows

TV Shows Web App - A web application based on an external API which contains information about TV shows. th web app let you like the shows that you like the most and comment what you think about them making use of an involvement API to save this interaction information.

Williams Colmenares 14 Dec 17, 2022
Dynamic-web-development - Dynamic web development used CSS and HTML

Dynamic-web-development ASSISNMENT I just used CSS and HTML to make a mobile int

null 1 Feb 8, 2022
Create and Host a dark Web Site (Tor Hidden Service)

Tutorial: Hosting a site on Dark Web (Tor Hidden Service) Introduction Before starting, lets clear some questions that might come up in your mind: Wha

Arnav Kumar 16 Oct 18, 2022
A Node.js REST API example built with Express and Typescript that can be used as template for creation of new servers.

api-example-firebase-nodejs A Node.js REST API example built with Express and Typescript that can be used as template for creation of new servers. The

Rodrigo João Bertotti 5 Nov 25, 2022