artanis
[Top][All Lists]
Advanced

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

Re: Can Docker/Artanis run on a network server?


From: Nala Ginrut
Subject: Re: Can Docker/Artanis run on a network server?
Date: Sun, 04 Apr 2021 17:04:55 +0800
User-agent: mu4e 1.4.15; emacs 27.1

Hi Mortimer!
I've removed the useless valid field in session.
Could you try the vanilla master to test you current case?

If everything is OK, then I think it's time to release 0.5.1 ;-)

Best regards.


Mortimer Cladwell writes:

> Hello!
> 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 192.168.1.17
>
> 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 =127.0.0.1
>
> entrypoint: the ip in the entrypoint command in Dockerfile e.g. 0.0.0.0 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 127.0.0.1 0.0.0.0 yes
> LAN no 192.168.1.17 0.0.0.0 yes
> local yes 127.0.0.1 0.0.0.0 yes
>
> LAN yes 192.168.1.17 0.0.0.0 no
> LAN yes 127.0.0.1 0.0.0.0 no
> LAN yes 192.168.1.17 192.168.1.17 no
> LAN yes 127.0.0.1 192.168.1.17 no
>
>
>
> Failure has two varieties:
> 1. The only entrypoint I find that works is 0.0.0.0  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 0.0.0.0 and artanis.conf host.addr 127.0.0.1 or
> 192.168.1.17 the app works as expected except for redirects i.e any
> controller that uses (redirect-to rc "/test/page2") will redirect me to:
>
> 0.0.0.0:3000/test/page2
>
> which is a fail.  However if I manually substitute 192.168.1.17 for 0.0.0.0
> 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")?
>
> Thanks
> Mortimer
>
> ===========================================================================================
> 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))
>   ))
>
> <html><body>
> <h1>Page 1</h1>
> <form action="/test/page1action" method="POST">
> <input type="submit" value="Send Request">
> </form></body>    </html>
>
> <html><body>
> <h1>Page 2</h1>
> </body></html>


--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

Attachment: signature.asc
Description: PGP signature


reply via email to

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