Go HTTP project
ccalhoun
PROOP

8 months 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

8 months ago

N/A


8 months ago

Are you using a Dockerfile or Railpack


ccalhoun
PROOP

8 months ago

Railpack


8 months ago

Is your repository public


ccalhoun
PROOP

8 months ago

It is private.


8 months ago

Is this project in Go or JS/TS


ccalhoun
PROOP

8 months ago

Go


8 months ago

What's the name of your project


ccalhoun
PROOP

8 months ago

Within Go, it's called c2c-app


8 months 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

8 months ago

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


8 months ago

Seems as if it is not


ccalhoun
PROOP

8 months ago

oof


8 months ago

I always just use Dockerfile because I ❤️ Dockerfile


ccalhoun
PROOP

8 months ago

I'll try that.


ccalhoun
PROOP

8 months ago

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

1388610953423356000


ccalhoun
PROOP

8 months ago

Public Networking

1388611270214946800


8 months ago

okay this is better


8 months 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"]

8 months ago

Edited ^^


ccalhoun
PROOP

8 months ago

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

1388612402030969000


8 months ago

Well. Does it work locally?


8 months ago

That's an application error


ccalhoun
PROOP

8 months ago

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


8 months ago

go run


8 months ago

:D


8 months ago

(Maybe)


ccalhoun
PROOP

8 months ago

Oh, Visual does that and no errors


8 months ago

Are you running it on terminal


8 months ago

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


ccalhoun
PROOP

8 months ago

Probably a good idea.



ccalhoun
PROOP

8 months ago

Looks like it's breaking via locally too.


ccalhoun
PROOP

8 months ago

Visual says it's fine, lol


8 months ago

Yeah Visual is sorta dumb with these things


8 months ago

But this is obviously not a Railway issue anymore


8 months ago

The error is actually pretty verbose


ccalhoun
PROOP

8 months ago

Thanks for your help!


8 months ago

Shows you exactly what you need to fix


ccalhoun
PROOP

8 months ago

I fixed the error and now we're golden!

1388614951949828400


8 months ago

Yippee!


ccalhoun
PROOP

8 months ago

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


8 months ago

PHP is horrible


8 months ago

Good for you


8 months ago

I recommend Actix


8 months ago

(Never used Pocketbase)


ccalhoun
PROOP

8 months 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


8 months ago

Inchresting


ccalhoun
PROOP

8 months ago

End result is medical grade parts.


Status changed to Solved uxuz 9 months ago


Loading...