Skip to content

bmf-san/gobel-ops-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.