Go HTTP project
ccalhoun
PROOP

a year ago

I'm utilizing Pocketbase and cannot get the HTTP to "serve" after the project deploys. I have the port set to 8090 and still getting 502 error.

What am I missing?

Solved$10 Bounty

49 Replies

ccalhoun
PROOP

a year ago

N/A


a year ago

Are you using a Dockerfile or Railpack


ccalhoun
PROOP

a year ago

Railpack


a year ago

Is your repository public


ccalhoun
PROOP

a year ago

It is private.


a year ago

Is this project in Go or JS/TS


ccalhoun
PROOP

a year ago

Go


a year ago

What's the name of your project


ccalhoun
PROOP

a year ago

Within Go, it's called c2c-app


a year ago

FROM golang:1.22-alpine AS builder

WORKDIR /c2c-app

COPY go.mod ./
COPY go.sum ./
RUN go mod download

COPY . .

RUN go build -o c2c-app .

FROM alpine:latest

WORKDIR /c2c-app

COPY --from=builder /c2c-app/c2c-app .

EXPOSE 8090

CMD ["./c2c-app"]

Try making a file called Dockerfile and dropping this in it


ccalhoun
PROOP

a year ago

I assume that the Railpack or Nixpack doesn't work with what I'm trying to do?


a year ago

Seems as if it is not


ccalhoun
PROOP

a year ago

oof


a year ago

I always just use Dockerfile because I ❤️ Dockerfile


ccalhoun
PROOP

a year ago

I'll try that.


ccalhoun
PROOP

a year ago

Still getting the 502 Bad Gateway error with this is my deploy log.

1388610953423355974


ccalhoun
PROOP

a year ago

Public Networking

1388611270214946836


a year ago

okay this is better


a year ago

FROM golang:1.22-alpine AS builder

WORKDIR /c2c-app

COPY go.mod ./
COPY go.sum ./
RUN go mod download

COPY . .

RUN go build -o c2c-app .

FROM alpine:latest

WORKDIR /c2c-app

COPY --from=builder /c2c-app/c2c-app .

EXPOSE 8090

CMD ["./c2c-app", "serve", "--http=0.0.0.0:8090"]

a year ago

Edited ^^


ccalhoun
PROOP

a year ago

Looks like Pocketbase is finally loading now. It's all kinds of pissed off.

1388612402030969024


a year ago

Well. Does it work locally?


a year ago

That's an application error


ccalhoun
PROOP

a year ago

Haven't figured out how to do it locally yet, lol


a year ago

go run


a year ago

:D


a year ago

(Maybe)


ccalhoun
PROOP

a year ago

Oh, Visual does that and no errors


a year ago

Are you running it on terminal


a year ago

I don't trust visual to not just pretend everything is fine


ccalhoun
PROOP

a year ago

Probably a good idea.



ccalhoun
PROOP

a year ago

Looks like it's breaking via locally too.


ccalhoun
PROOP

a year ago

Visual says it's fine, lol


a year ago

Yeah Visual is sorta dumb with these things


a year ago

But this is obviously not a Railway issue anymore


a year ago

The error is actually pretty verbose


ccalhoun
PROOP

a year ago

Thanks for your help!


a year ago

Shows you exactly what you need to fix


ccalhoun
PROOP

a year ago

I fixed the error and now we're golden!

1388614951949828226


a year ago

Yippee!


ccalhoun
PROOP

a year ago

I'm trying to develop in newer ways outside of PHP so it's quite the learning curve.


a year ago

PHP is horrible


a year ago

Good for you


a year ago

I recommend Actix


a year ago

(Never used Pocketbase)


ccalhoun
PROOP

a year ago

This "software" is going to be utilizing data from digital measuring calipers and inserting them into the proper fields. Which will check that data to the tolerance, show green or red for pass/fail


a year ago

Inchresting


ccalhoun
PROOP

a year ago

End result is medical grade parts.


Status changed to Solved uxuz 11 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...