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


samgordon
PRO

8 months ago

Are you using a Dockerfile or Railpack


ccalhoun
PROOP

8 months ago

Railpack


samgordon
PRO

8 months ago

Is your repository public


ccalhoun
PROOP

8 months ago

It is private.


samgordon
PRO

8 months ago

Is this project in Go or JS/TS


ccalhoun
PROOP

8 months ago

Go


samgordon
PRO

8 months ago

What's the name of your project


ccalhoun
PROOP

8 months ago

Within Go, it's called c2c-app


samgordon
PRO

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?


samgordon
PRO

8 months ago

Seems as if it is not


ccalhoun
PROOP

8 months ago

oof


samgordon
PRO

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


samgordon
PRO

8 months ago

okay this is better


samgordon
PRO

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

samgordon
PRO

8 months ago

Edited ^^


ccalhoun
PROOP

8 months ago

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

1388612402030969000


samgordon
PRO

8 months ago

Well. Does it work locally?


samgordon
PRO

8 months ago

That's an application error


ccalhoun
PROOP

8 months ago

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


samgordon
PRO

8 months ago

go run


samgordon
PRO

8 months ago

:D


samgordon
PRO

8 months ago

(Maybe)


ccalhoun
PROOP

8 months ago

Oh, Visual does that and no errors


samgordon
PRO

8 months ago

Are you running it on terminal


samgordon
PRO

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


samgordon
PRO

8 months ago

Yeah Visual is sorta dumb with these things


samgordon
PRO

8 months ago

But this is obviously not a Railway issue anymore


samgordon
PRO

8 months ago

The error is actually pretty verbose


ccalhoun
PROOP

8 months ago

Thanks for your help!


samgordon
PRO

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


samgordon
PRO

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.


samgordon
PRO

8 months ago

PHP is horrible


samgordon
PRO

8 months ago

Good for you


samgordon
PRO

8 months ago

I recommend Actix


samgordon
PRO

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


samgordon
PRO

8 months ago

Inchresting


ccalhoun
PROOP

8 months ago

End result is medical grade parts.


Status changed to Solved uxuz 8 months ago


Loading...