GithubHelp home page GithubHelp logo

web-ansible's Introduction

Docker Setup For Static Site Development Using Ansible.

This is meant to be a starter template for setting up docker containers for running a static site. It uses Ansible to create the containers instead of docker-compose.

The containers used are from Wodby and the following referencess are helpful when configuring the playbook.

Notes

The docroot of the site is the "site" directory.

The settings for the environment variables referenced above are kept in the vars.yml file.

Usage

Copy/fork this repo, update the "PROJECT_NAME" variable in the "vars" file and run:

ansible-playbook -i inventory.bolivar --connection=local playbook.yml

Obviously using a different inventory file and potentially not specifying the "--connection" option if you're not creating the containers on your local machine that is named "bolivar".

This setup assumes you've already set up the traefik container on the machine to handle inbound traffic.

The Lets Encrypt integration assumes that your computer is accessible from the internet and port 80 is accepting requests for any sub-domain ending in bolivar.kedrovsky.com.

Removing The Containers

If there's ever a need to stop and remove the containers just run:

ansible-playbook -i inventory.bolivar --connection=local playbook-remove.yml

Basic Auth

Generate a password using:

openssl passwd -apr1

Update the basicauth and middleware labels in the web server config of the playbook with the new user and password. The default user/password in the playbook is web/web.

To remove the basic auth just remove the these two labels

"traefik.http.middlewares.{{ PROJECT_NAME }}-auth.basicauth.users": "{{ BASIC_AUTH_USER }}:{{ BASIC_AUTH_PASSWORD }}"
"traefik.http.routers.{{ PROJECT_NAME }}.middlewares": "{{ PROJECT_NAME }}-auth"

web-ansible's People

Contributors

karlkedrovsky avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.