[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can Docker/Artanis run on a network server?

From: Mortimer Cladwell
Subject: Can Docker/Artanis run on a network server?
Date: Sat, 27 Mar 2021 02:41:09 -0400

Has anyone gotten a Dockerified Artanis app to run on a LAN server?

In the table below I share my experience trying. The definition of the various columns are as follows:

Location: local - my office workstation; LAN - a server on the internal LAN with an ip of

Docker: yes - I am using docker running with the command "docker run --rm -p 3000:3000 -v /tmp:/myapp/pub/tmp myapp";
        no - I have guile and artanis installed on the OS (Debian 10) and I am using "art work" at a terminal prompt.

ip: the ip address in artanis.conf e.g. host.addr =

entrypoint: the ip in the entrypoint command in Dockerfile e.g. for the command "ENTRYPOINT [ "art", "work", "-h0.0.0.0" ]

success?: Yes - it worked; No - there are problems

location Docker ip entrypoint success?
======== ===== == ========== ========
local no yes
LAN no yes
local yes yes

LAN yes no
LAN yes no
LAN yes no
LAN yes no

Failure has two varieties:
1. The only entrypoint I find that works is  All others give an error like:
In artanis/server/ragnarok.scm:
   630:10  4 (establish-http-gateway _)
   443:16  3 (ragnarok-http-gateway-run _)
    90:24  2 (ragnarok-open #:host _ #:family _ #:addr _ #:port _)
     70:4  1 (make-listen-socket 2 3232235793 3000)
In unknown file:
           0 (bind #<input-output: socket 24> 2 3232235793 3000)

ERROR: In procedure bind:
In procedure bind: Cannot assign requested address

2. With entrypoint and artanis.conf host.addr or the app works as expected except for redirects i.e any controller that uses (redirect-to rc "/test/page2") will redirect me to:

which is a fail.  However if I manually substitute for in the browser address bar, I can get to page2.  So the problem I am having is with redirection.  All controllers that use (view-render "page1" (the-environment)) work fine.

Any ideas?
Are there other flags for art work (besides "-h")?


My simplified controllers/views for testing redirection:

(define-artanis-controller test) ; DO NOT REMOVE THIS LINE!!!

(test-define page1
  (lambda (rc)
   (view-render "page1" (the-environment))

(post "/test/page1action"
(lambda (rc)
    (redirect-to rc "/test/page2")

(test-define page2
  (lambda (rc)
   (view-render "page2" (the-environment))

<h1>Page 1</h1>
<form action="" method="POST">
<input type="submit" value="Send Request">
</form></body>    </html>

<h1>Page 2</h1>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]