IamIconLiving
IamIconLiving
Explore posts from servers
RRailway
Created by IamIconLiving on 4/24/2024 in #✋|help
404 main page not found
I deployed a docker file that contains multiple services and express app that serves react is one of them. When I try to access the main webpage, I get 404 with following logs in the deployment
Error: ENOENT: no such file or directory, stat '/usr/src/app/noodle/build/index.html'
Error: ENOENT: no such file or directory, stat '/usr/src/app/noodle/build/index.html'
Error: ENOENT: no such file or directory, stat '/usr/src/app/noodle/build/index.html'
Error: ENOENT: no such file or directory, stat '/usr/src/app/noodle/build/index.html'
I tried to set the Caddyfile and nixpacks.toml files based on this repo here https://github.com/brody192/vite-react-template/blob/main/nixpacks.toml to no luck https://popspace-demo-production.up.railway.app/
17 replies
RRailway
Created by IamIconLiving on 4/24/2024 in #✋|help
Stuck on applying change
No description
4 replies
RRailway
Created by IamIconLiving on 4/24/2024 in #✋|help
Docker image failes to copy `.git` directory
I wonder what am I doing wrong, as it seems like a trivial thing - copying a git directory onto the machine but it fails at this step.
#15 CANCELED



-----

> [11/32] COPY .git ./.git:

-----



Dockerfile:13

-------------------

11 | COPY unicorn/component/package.json ./unicorn/component/package.json

12 | COPY file-upload/package.json ./file-upload/package.json

13 | >>> COPY .git ./.git

14 |

15 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

-------------------

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ddffb5fd-75d2-46a7-a72d-fa700071e8dc::t5indqmujowf4cd2qxu4ox7cn: "/.git": not found


#15 CANCELED



-----

> [11/32] COPY .git ./.git:

-----



Dockerfile:13

-------------------

11 | COPY unicorn/component/package.json ./unicorn/component/package.json

12 | COPY file-upload/package.json ./file-upload/package.json

13 | >>> COPY .git ./.git

14 |

15 | ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

-------------------

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref ddffb5fd-75d2-46a7-a72d-fa700071e8dc::t5indqmujowf4cd2qxu4ox7cn: "/.git": not found


Here is the entire Docker file https://github.com/with-labs/popspace/blob/main/Dockerfile
9 replies
RRailway
Created by IamIconLiving on 8/24/2023 in #✋|help
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock
I tried deleting my Railway proc file and getting this error now ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running
9 replies
RRailway
Created by IamIconLiving on 4/20/2023 in #✋|help
Possibility to specify service during `railway up`
As subject states, is it possible to specify target service during railway up to avoid interactive mode? If there is a deployment of multiple services that needs to be done automatically without user selecting what goes to which service interactively, Some like railway up --service=client etc
4 replies
RRailway
Created by IamIconLiving on 4/20/2023 in #✋|help
React with router getting 404
I know it's a common knowledge where SPAs are getting 404 if used in combination with routing solution, however it seems that some people were able to fix it, but not my case unfortunately. I followed steps advised in this thread - https://discord.com/channels/713503345364697088/1019596063079944273 but now I am just getting Server Error from Railway when trying to access the webapp and there are no logs in the Deployment logs at all. My Dockerfile
FROM node:18-alpine AS builder

ARG PORT

# Add a work directory
WORKDIR /app

COPY package.json .

RUN npm install

COPY . /app/

RUN npm run build

FROM nginx:1.19.10-alpine

# Set working directory to nginx asset directory
WORKDIR /usr/share/nginx/html

# Remove default nginx static assets
RUN rm -rf ./*

COPY --from=builder /app/build .

COPY .nginx/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 3000

ENTRYPOINT ["nginx", "-g", "daemon off;"]
FROM node:18-alpine AS builder

ARG PORT

# Add a work directory
WORKDIR /app

COPY package.json .

RUN npm install

COPY . /app/

RUN npm run build

FROM nginx:1.19.10-alpine

# Set working directory to nginx asset directory
WORKDIR /usr/share/nginx/html

# Remove default nginx static assets
RUN rm -rf ./*

COPY --from=builder /app/build .

COPY .nginx/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 3000

ENTRYPOINT ["nginx", "-g", "daemon off;"]
And .nginx/nginx.conf file
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
}
server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
}
I am not even sure how to troubleshoot this as it seems like i am not hitting the webapp at all as there are no logs? Any help would be appreciated
10 replies