Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying Bukdu in Docker container #53

Open
AlbertoHdezCerezo opened this issue Oct 12, 2018 · 6 comments
Open

Deploying Bukdu in Docker container #53

AlbertoHdezCerezo opened this issue Oct 12, 2018 · 6 comments

Comments

@AlbertoHdezCerezo
Copy link

Hi,

Recently I started working with Julia developing microservices. I am using Bukdu to mount a server. Locally it works, but when trying to deploy it in Docker, it does not work. After loading the script a error appears:

WARNING: could not import Servers.nosslconfig into Bukdu

Here is my Docker:

# Select Official Julia 1.0.1 Distribution
# =========================================================
FROM julia:1.0.1-stretch

# Set directory project and copy project
# ======================================
WORKDIR /home/app/julia-bot-api
COPY . /home/app/julia-bot-api

RUN julia deps.jl

# Expose APP port
# ===============
EXPOSE 8080

# Run server when machine is created
# ==================================
CMD julia -i server.jl

And my server:

include("deeplearning.jl")

using Bukdu
import .Bukdu.Actions: index, show, new, edit, create, delete, update
using .DeepLearning

pipeline(:api) do conn::Conn
end

routes(:api) do
    resources("deeplearning", DeepLearningController)
end

Bukdu.start(8080)

Do you know what could be the issue?

@wookay
Copy link
Owner

wookay commented Oct 12, 2018

thanks for the issue. that's the error by changed since HTTP.jl v0.7.0.
I fixed it on master and submit the new release (v0.3.3).

@wookay
Copy link
Owner

wookay commented Oct 24, 2018

OK. we got the Bukdu v0.3.3, please test with it.

@Seanny123
Copy link

I tried this with the most recent version of Bukdu and it still failed.

@wookay
Copy link
Owner

wookay commented Dec 18, 2018

@Seanny123 I don't know much about the docker settings.
but at least this should work. please check your Container ID and try docker exec -it.

~/dockerfiles/julia-bukdu master✔ docker run -p 5000:8080 julia-bukdu
INFO: Bukdu Listening on: 127.0.0.1:8080
~ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
9c091f715e83        julia-bukdu         "julia app.jl"      2 minutes ago       Up 2 minutes        0.0.0.0:5000->8080/tcp   vibrant_allen

~ docker exec -it 9c091f715e83 curl localhost:8080/init/region/west/site/1/channel/2/
["init","west",1,2]

@Seanny123
Copy link

Seanny123 commented Dec 18, 2018 via email

@Seanny123
Copy link

Due to a series of embarrassing misunderstandings, I thought 0.0.0.0 and 127.0.0.1 were equivalent. They are not. By changing the code to Bukdu.start(8080, "0.0.0.0") the problem was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants