<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://www.xlayer.co.za/forum/extern.php?action=feed&amp;tid=101&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[SXI Forum / SXIWebServices-2.3 (Writing to a database) in Docker]]></title>
		<link>https://www.xlayer.co.za/forum/viewtopic.php?id=101</link>
		<description><![CDATA[The most recent posts in SXIWebServices-2.3 (Writing to a database) in Docker.]]></description>
		<lastBuildDate>Thu, 17 Oct 2019 05:55:21 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: SXIWebServices-2.3 (Writing to a database) in Docker]]></title>
			<link>https://www.xlayer.co.za/forum/viewtopic.php?pid=159#p159</link>
			<description><![CDATA[<p>Remember if you get the </p><div class="codebox"><pre><code>http: server gave HTTP response to HTTPS client</code></pre></div><p> error you need to perform the following:</p><p>Go to docker settings on your local machine and perform the following:</p><ul><li><p>For <strong>Windows</strong> go to docker settings and on the &quot;Daemon&quot; tab click on the advanced toggle switch and add the following to the json given: </p><div class="codebox"><pre><code>&quot;insecure-registries&quot;: [&quot;xlayer.co.za:5000&quot;]</code></pre></div></li><li><p>For <strong>Linux</strong> edit the &quot;daemon.json&quot; file. The default location is &quot;/etc/docker/daemon.json&quot;. (If the file cannot be found, create it.) then add the following code:</p><div class="codebox"><pre><code>{
  &quot;insecure-registries&quot; : [&quot;xlayer.co.za:5000&quot;]
}</code></pre></div></li></ul>]]></description>
			<author><![CDATA[dummy@example.com (SeanR)]]></author>
			<pubDate>Thu, 17 Oct 2019 05:55:21 +0000</pubDate>
			<guid>https://www.xlayer.co.za/forum/viewtopic.php?pid=159#p159</guid>
		</item>
		<item>
			<title><![CDATA[SXIWebServices-2.3 (Writing to a database) in Docker]]></title>
			<link>https://www.xlayer.co.za/forum/viewtopic.php?pid=158#p158</link>
			<description><![CDATA[<p>In order to run the SXIWebservices that write to a database we need to make use of 2 containers.&#160; One for the actual web services and another for the database.&#160; The database we are using in this instance is MariaDB which is actually just MYSQL.</p><p>You will need to create a file called <strong>docker-compose.yml</strong> inside this file add the code below:</p><div class="codebox"><pre class="vscroll"><code>version: &#039;3&#039;

services:
    ws:            
        image: xlayer.co.za:5000/sxiws:2.3
        container_name: sxiws
        ports:
            - 8080:8080
        networks:
            - sxiws_net
        volumes:
            # ===== Windows Host =====
            - C:/SXI/XPress/XmlOut:/opt/SXI/XPress/XmlOut
            - C:/SXI/WebServiceLogs:/opt/SXI/WebServiceLogs
            # ====== Linux Host ======
            #- /opt/SXI/XPress/XmlOut:/opt/SXI/XPress/XmlOut
            #- /opt/SXI/WebServiceLogs:/opt/SXI/WebServiceLogs

    db:
        image: xlayer.co.za:5000/sxiwsdb:2.3
        container_name: sxiwsdb
        ports:
            - 3306:3306
        networks:
            - sxiws_net
        volumes:
            # ===== Windows Host =====
            - C:/SXI/SXIDB:/var/lib/mysql
            # ====== Linux Host ======
            #- /opt/SXI/SXIDB:/var/lib/mysql
        command:
            &#039;mysqld --innodb-flush-method=fsync&#039;

networks:
    sxiws_net:
        driver: bridge</code></pre></div><p><strong><span style="color: #FF0000">NB:</span></strong> Remember to comment the Windows paths and uncomment the unix paths if you are running on Linux.</p><p>Now that you have the docker-compose.yml file all you have to do is run the following from a command line in the directory where you saved file you created:</p><div class="codebox"><pre><code>docker-compose up</code></pre></div><p><strong><span style="color: #FF0000">Note:</span></strong> If this is the first time you are running this command it will download the images you need and then will set them up for you.&#160; (I.e. it will create the relevant database, tables and users you need)&#160; This can take up to 3 mins after the download is complete.</p><p>You should now be able to browse to <a href="http://localhost:8080/SXIWebServices-2.3" rel="nofollow">http://localhost:8080/SXIWebServices-2.3</a></p><p>To test you can use SoapUI to send SOAP or REST transactions to the SXI web services.&#160; To see the transactions in the database you will need to connect something like DBeaver or MYSQLWorkbenchto the &quot;sxiwsdb&quot; container.</p><p>To get the docker IP of the &quot;sxiwsdb&quot; container run the following command and look for the IPAddress tag:</p><div class="codebox"><pre><code>docker inspect sxiwsdb</code></pre></div><p>Once you have the ip address you can connect using port 3306 with the username of &#039;<strong>sxi</strong>&#039;.&#160; The password is a common SXI password however will not be published here.</p><p><strong><span style="color: #FF0000">Note:</span></strong> This image by default will not write XML files to the filesystem.&#160; However, with some simple configuration this can be achieved.&#160; &#160;For now though you are welcome to download and install the 2.1 image which can run concurrently with 2.3 as long as the ports are changed.</p>]]></description>
			<author><![CDATA[dummy@example.com (SeanR)]]></author>
			<pubDate>Wed, 16 Oct 2019 14:45:23 +0000</pubDate>
			<guid>https://www.xlayer.co.za/forum/viewtopic.php?pid=158#p158</guid>
		</item>
	</channel>
</rss>
