<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: majordomo-systems</title>
    <description>The latest articles on DEV Community by majordomo-systems (@majordomosystems).</description>
    <link>https://dev.to/majordomosystems</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F561108%2Fbc4ce504-9a9b-4d62-a76f-7dec0d8496c5.png</url>
      <title>DEV Community: majordomo-systems</title>
      <link>https://dev.to/majordomosystems</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/majordomosystems"/>
    <language>en</language>
    <item>
      <title>Odoo | Hasura GraphQL | Docker</title>
      <dc:creator>majordomo-systems</dc:creator>
      <pubDate>Sat, 16 Jan 2021 15:21:46 +0000</pubDate>
      <link>https://dev.to/majordomosystems/odoo-hasura-graphql-docker-2acd</link>
      <guid>https://dev.to/majordomosystems/odoo-hasura-graphql-docker-2acd</guid>
      <description>&lt;p&gt;I had been struggling with getting certain Odoo modules working nicely within a Docker container. My interest in Odoo is not for client work, more for infrastructure-as-code and for use as a headless CMS for application development.&lt;/p&gt;

&lt;p&gt;However, I wanted to use any API other than Odoo’s XML-RPC.&lt;/p&gt;

&lt;p&gt;The initial hope was to get the GraphQL module working. I had issues with graphql-core-server within a Docker container, so gave up, and opted for OpenAPI’s REST instead. I still wasn’t happy.&lt;/p&gt;

&lt;p&gt;There is something I dont like about the API being provided by a module and I wanted more separation between the API and Odoo. I was still thinking about GraphQL. Then it hit me. Hasura!&lt;/p&gt;

&lt;p&gt;Hasura provides a GraphQL API layer over new or existing Postgres databases. I’ve wanted to have a reason to start playing with it and finally the perfect scenario came along.&lt;/p&gt;

&lt;p&gt;Here are the steps to get Odoo running, within a container, alongside Hasura, Postgres and Caddy. Personally, I think this is the greatest thing ever…&lt;/p&gt;

&lt;p&gt;Here is the repo — &lt;a href="https://github.com/majordomo-systems/odoo-hasura-docker"&gt;https://github.com/majordomo-systems/odoo-hasura-docker&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Docker &amp;amp; Docker Compose on host&lt;/li&gt;
&lt;li&gt;&lt;code&gt;curl -s https://raw.githubusercontent.com/majordomo-systems/odoo-hasura-docker/14.0/run.sh | sudo bash -s odoo-hasura-docker&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to add modules, copy them into the addons folder. On occasion dependencies need to be installed and examples of how to do so are in the run.sh.&lt;/p&gt;

&lt;p&gt;Odoo.conf in /etc is mounted within the container as well.&lt;/p&gt;

&lt;p&gt;Odoo will be running on port 14069, the GraphQL console on 80.&lt;/p&gt;

&lt;p&gt;Bon appetit!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>graphql</category>
      <category>odoo</category>
    </item>
  </channel>
</rss>
