bmf-san / gobel-ops-example

Gobel is a headless cms built with golang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gobel-ops-example

Gobel is a headless cms built with golang.

This is an example infrastructure configuration management for running gobel-example on the production environment on VPS by using terraform and ansible.

This sample code assumes the use of a Japanese VPS called conoha.

gobel

Get started

Assuming execution from the local environment.

Need to install the following tools:

  • terraform
  • ansible
  • ansible-lint

Setup infrastructure by terraform

Create a terraform.tfvars. See variables.tf for the variables you need to set.

cd terraform/
make apply

Provisioning by ansible

To perform a DNS-01 challenge with letsencrypt with certificate acquisition, you need to set dns before running provision.

Please set the A record to the domain.

It is OK if the A record is returned by executing the dig command.

dig DOMAIN_NAME
cd ansible/
make init-provision
make provision

Deploy

cd /deploy
cp .env.example .env # see a host file in /ansible/inventories/host_vars and edit an .env.
make deploy

License

This project is licensed under the terms of the MIT license.

Author

bmf - Software engineer.

About

Gobel is a headless cms built with golang.

License:MIT License


Languages

Language:HCL 68.7%Language:Makefile 24.3%Language:Smarty 7.0%