PixelPioneer
PixelPioneer
Explore posts from servers
RRailway
Created by PixelPioneer on 7/2/2024 in #✋|help
Multiple ports in docker
hey i have a svelte and go app in a docker contianer ( tldr -> my i have django(1st contianer successfully deployed), go and svelte app( another contianer), Django app makes api calls to the golang server that writes to the svelte files; I am porting this here form aws, here is my repo link ->https://github.com/MONISHSHARMA080/deploy_first_website-to_fly/ ) I want to serve my svelte app on the default port(80) and go on 4696(any thing else will be fine too ) but when i deploy it i set the PORT variable to be 4696 and i get the go server( live here ->https://deployfirstwebsite-tofly-production.up.railway.app/), but when it is 80 i get nothing in return , and also how am I able to serve both the apps on different ports
4 replies
TTCTheo's Typesafe Cult
Created by PixelPioneer on 5/4/2024 in #questions
Docker help -> writing to file in a seperate container
I have 2 docker file/containers where one is a next app and another one is a go server, is there a way in which I can manipulate my next js files from my golang container, chatgpt says a shared volume, but I am not able to make it work (see the next js dir and write to it ). if you want my docker-compose.yaml ->
services: go_app: restart: always build: context: . dockerfile: Dockerfile.go_app ports: - "4696:4696" nextjs: restart: always build: context: . dockerfile: Dockerfile ports: - "3000:3000" services: go_app: restart: always build: context: . dockerfile: Dockerfile.go_app ports: - "4696:4696" nextjs: restart: always build: context: . dockerfile: Dockerfile ports: - "3000:3000"
my next js dockerfile ->

FROM node:21-alpine3.18 AS node-build WORKDIR /app COPY package.json package-lock.json ./ RUN npm install COPY . . FROM node:latest WORKDIR /app COPY --from=node-build /app/. . EXPOSE 3000 EXPOSE 3333 Command to run both Go and Next.js CMD npm run dev
my go_app docker file ->
FROM golang:latest AS golangBuild WORKDIR /app COPY go.mod go.mod EXPOSE 4696 COPY a.go a.go RUN go build -o goserver . Expose port CMD [ "./goserver" ]
3 replies
TTCTheo's Typesafe Cult
Created by PixelPioneer on 5/3/2024 in #questions
Hosting platform
Hi, I do you guys know a hosting platform that supports exposing multiple ports to the public , if it has a free tier it will be great as I want to try my idea out first
background on why am i doing this -> I have a dockerized next js app that also has golang api ( go cause i want to run next in dev mode in prod and golang to make react components(by llm) by using create dir. by using file based routing on the fly ) as next js gives error if the react component is wrong and will not let api work
3 replies
TTCTheo's Typesafe Cult
Created by PixelPioneer on 3/13/2024 in #questions
Ui Design for side projects
Hey I just got started with react native and was wondering how you guys (in general ) come up with great designs from your frontend (I saw in the project show off section and my self want to get better )
2 replies