bbot
bbot
RRailway
Created by bbot on 1/16/2024 in #✋|help
Run SQL on our Postgres Instance
What's the easiest way to run SQL syntax on our postgres database? I looked at PGAdmin4, but I'm not sure what all the settings would be. Are there easier ways?
7 replies
RRailway
Created by bbot on 1/13/2024 in #✋|help
Can't get React + Docker production running with ENV variables
Hello! I have a Create React app, attempting to load via Dockerfile. Works perfectly fine in dev with variables and using npm run dev For production, followed this common answer that didn't work I'm wondering if it's because I had to eject the app maybe? Not sure, but here is where I am now. This is my package.json:
"scripts": {
"start": "serve build -s -n -L -p $PORT",
"dev": "node scripts/start.js NODE_ENV=development",
"build": "GENERATE_SOURCEMAP=false node scripts/build.js",
"test": "node scripts/test.js"
}
"scripts": {
"start": "serve build -s -n -L -p $PORT",
"dev": "node scripts/start.js NODE_ENV=development",
"build": "GENERATE_SOURCEMAP=false node scripts/build.js",
"test": "node scripts/test.js"
}
This is my Dockerfile:
# Base image
FROM node:20.9
ARG RAILWAY_ENVIRONMENT
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV REACT_APP_ENV=production
RUN npm run build
RUN npm prune --production
EXPOSE 80
CMD ["npm", "run", "start"]
# Base image
FROM node:20.9
ARG RAILWAY_ENVIRONMENT
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
ENV REACT_APP_ENV=production
RUN npm run build
RUN npm prune --production
EXPOSE 80
CMD ["npm", "run", "start"]
When I deploy in prod, I'm getting these errors:
IntegrationError: Missing value for Stripe(): apiKey should be a string.
InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
IntegrationError: Missing value for Stripe(): apiKey should be a string.
InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key
I have the environment variables just like I have in dev. I don't understand why it can't find any of the environment variables declared the Railway. Any help? Project ID: c7f059bc-d402-459e-afbb-0d4892a4b1a5
9 replies