HipsterSavage
HipsterSavage
Explore posts from servers
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
Thank You @Vin
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
Solved Dockerfile worked. Here's its code:
# Use an official Node.js 16 runtime as the base image
FROM node:16

# Set the working directory in the container to /app
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install any needed packages specified in package.json
RUN npm install

# Install fontconfig
RUN apt-get update && apt-get install -y fontconfig

# Copy the current directory contents into the container at /app
COPY . .

# Make port 80 available to the world outside this container
# Note: it may be not needed for your specific setup
EXPOSE 80

# Run the build command
RUN npm run deploy

# Specify the start command
CMD [ "npm", "run", "start:prod" ]
# Use an official Node.js 16 runtime as the base image
FROM node:16

# Set the working directory in the container to /app
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install any needed packages specified in package.json
RUN npm install

# Install fontconfig
RUN apt-get update && apt-get install -y fontconfig

# Copy the current directory contents into the container at /app
COPY . .

# Make port 80 available to the world outside this container
# Note: it may be not needed for your specific setup
EXPOSE 80

# Run the build command
RUN npm run deploy

# Specify the start command
CMD [ "npm", "run", "start:prod" ]
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
of course, thank You
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
Could I just remove the port line?
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
Here's my Dockerfile placed in the main folder of the app. Is it configured properly for Railway standards?
# Use an official Node.js 16 runtime as the base image
FROM node:16

# Set the working directory in the container to /app
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install any needed packages specified in package.json
RUN npm install

# Install fontconfig
RUN apt-get update && apt-get install -y fontconfig

# Copy the current directory contents into the container at /app
COPY . .

# Make port 80 available to the world outside this container
EXPOSE 80

# Run the build command
RUN npm run deploy

# Specify the start command
CMD [ "npm", "run", "start:prod" ]
# Use an official Node.js 16 runtime as the base image
FROM node:16

# Set the working directory in the container to /app
WORKDIR /app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install any needed packages specified in package.json
RUN npm install

# Install fontconfig
RUN apt-get update && apt-get install -y fontconfig

# Copy the current directory contents into the container at /app
COPY . .

# Make port 80 available to the world outside this container
EXPOSE 80

# Run the build command
RUN npm run deploy

# Specify the start command
CMD [ "npm", "run", "start:prod" ]
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
I understand for now. Will try my luck with the Dockerfile then, thank You!
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
Also what about default Railway procedures, will my Dockerfile replace them?
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
Fontconfig Error on Railway Deployment
Will Railway options be ignored then?
16 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
libuuid.so.1: cannot open shared object file: No such file or directory
still 5$ free tho
14 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
libuuid.so.1: cannot open shared object file: No such file or directory
@strooss you had a problem with that
14 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
libuuid.so.1: cannot open shared object file: No such file or directory
Solved After adding
"optionalDependencies": {
"node-canvas": "*"
}
"optionalDependencies": {
"node-canvas": "*"
}
to package.json in main folder of the project despite it doing nothing in particular, Railway recongized the package and made libuuid and libGL available in the environment. Be aware node-canvas is not an actual name of the package. It should be canvas as stated in the docs. https://www.npmjs.com/package/canvas Despite that fact I added manually node-canvas to the optional dependencies and it worked so I left it like that. If you try this solution, be sure to check if npm i canvas won't be enough and feel free to post info about it here. Note that optional dependencies don't need to really be succesfully installed, because npm ignores its instalation errors.
14 replies
RRailway
Created by HipsterSavage on 8/1/2023 in #✋|help
libuuid.so.1: cannot open shared object file: No such file or directory
Ok, found this mention in the nixpacks.docs: (https://nixpacks.com/docs/providers/node)

Node Canvas

If node-canvas is found in the package.json file, then the libuuid and libGL libraries are made available in the environment.

Node Canvas

If node-canvas is found in the package.json file, then the libuuid and libGL libraries are made available in the environment.
Seems like since my project uses node canvas and not canvas it might be the case of why proper libraries are not added. Gonna try this at home.
14 replies