Created
July 17, 2019 08:21
-
-
Save patrixr/ff6594adf82025354e1dedbd765b3f24 to your computer and use it in GitHub Desktop.
Hasura deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - 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