From 7a7e25c3b1fe99f0145a4d93b77f57bae430c5b7 Mon Sep 17 00:00:00 2001 From: Zig Blathazar <42387185+ZigBalthazar@users.noreply.github.com> Date: Sat, 12 Oct 2024 20:08:15 +0330 Subject: [PATCH] ci(dockerfile): fix port and binds (#67) --- config/config.yml | 8 ++++---- config/config_test.go | 4 ++-- dockerfile | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/config.yml b/config/config.yml index eabe53d..8704fab 100644 --- a/config/config.yml +++ b/config/config.yml @@ -14,10 +14,10 @@ environment: "prod" ws_server: # bind is the IP address to be bind and listen on. # default if local host. - bind: "localhost" + bind: "0.0.0.0" # port is websocket port to be listen on. # default is 7777. - port: 7777 + port: 9090 # known_bloom_size is the size of bloom filter to check and avoid trying to store/broadcast existing events. # default is 1M events. known_bloom_size: 1000000 @@ -29,10 +29,10 @@ ws_server: http_server: # bind is the IP address to be bind and listen on. # default if local host. - bind: "localhost" + bind: "0.0.0.0" # port is websocket port to be listen on. # default is 8888. - port: 8888 + port: 8080 # database contains details of database connections and limitations. database: diff --git a/config/config_test.go b/config/config_test.go index 9f45fdb..bb30aac 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -12,6 +12,6 @@ func TestLoadfromFile(t *testing.T) { cfg, err := config.Load("./config.yml") require.NoError(t, err, "error must be nil.") - assert.Equal(t, uint16(7777), cfg.WebsocketServer.Port) - assert.Equal(t, "127.0.0.1", cfg.WebsocketServer.Bind) + assert.Equal(t, uint16(9090), cfg.WebsocketServer.Port) + assert.Equal(t, "0.0.0.0", cfg.WebsocketServer.Bind) } diff --git a/dockerfile b/dockerfile index 2c338ef..b237f28 100644 --- a/dockerfile +++ b/dockerfile @@ -34,8 +34,8 @@ COPY --from=builder /app/build/immortal . COPY --from=builder /app/config/config.yml . #* Expose necessary ports for the application -EXPOSE 7777 -EXPOSE 8888 +EXPOSE 9090 +EXPOSE 8080 #* Set the entrypoint to run the application ENTRYPOINT ["./immortal", "run", "./config.yml"]