Skip to content

Instantly share code, notes, and snippets.

@patrixr patrixr/deploy.yml
Created Jul 17, 2019

Embed
What would you like to do?
Hasura deployment
---
- hosts: all
remote_user: {{ REMOTE_USER }}
become: true
tasks:
- name: Install Docker
yum:
name: docker
state: present
- name: Ensure Docker is running
service:
name: docker
state: started
- name: Install Hasura
docker_container:
name: graphql-engine
image: hasura/graphql-engine:v1.0.0-beta.3
ports:
- "5432:5432"
env:
HASURA_GRAPHQL_ENABLE_CONSOLE: true
HASURA_GRAPHQL_DATABASE_URL: {{ POSTGRES_URL }}
- name: Nginx reverse proxy
template:
src: "nginx.config.j2"
dest: "/etc/nginx/conf.d/{{ SERVICE_URL }}"
mode: 0640
owner: {{ REMOTE_USER }}
- name: Restart Nginx
service:
name: nginx
state: restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.