R
Railway6mo ago
Audi

How can i open my app using pubic link generated by Railway app. as I am getting in my logs.

[email protected] preview
vite preview
➜ Local: http://localhost:6173/ ➜ Network: http://172.17.3.223:6173/
Solution:
https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into your project and remove any custom start commands you may have set...
Jump to solution
25 Replies
Percy
Percy6mo ago
Project ID: N/A
Audi
AudiOP6mo ago
where to find project Id
Brody
Brody6mo ago
you are trying to run a development server
Audi
AudiOP6mo ago
"scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, I am running Preview after build
Brody
Brody6mo ago
thats not something you would want to do, it would be costly and unstable
Solution
Brody
Brody6mo ago
https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into your project and remove any custom start commands you may have set
Audi
AudiOP6mo ago
ohk i will do but i should still use build command right ?
Brody
Brody6mo ago
yes
Audi
AudiOP6mo ago
ohk i will try [stage-0 14/15] RUN caddy fmt --overwrite Caddyfile #21 0.426 Error: reading input file: open Caddyfile: no such file or directory #21 ERROR: process "/bin/bash -ol pipefail -c caddy fmt --overwrite Caddyfile" did not complete successfully: exit code: 1 -----
[stage-0 14/15] RUN caddy fmt --overwrite Caddyfile:
0.426 Error: reading input file: open Caddyfile: no such file or directory ----- Dockerfile:34 ------------------- 32 | # fmt phase 33 | COPY . /app/. 34 | >>> RUN caddy fmt --overwrite Caddyfile 35 | 36 | ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c caddy fmt --overwrite Caddyfile" did not complete successfully: exit code: 1 Error: Docker build failed my deployment is failing
Brody
Brody6mo ago
did you forget to copy the Caddyfile?
Audi
AudiOP6mo ago
No i have added canddyfile
Brody
Brody6mo ago
please double check
Audi
AudiOP6mo ago
ohk i will delete the service and deploy the repo again
Brody
Brody6mo ago
why? did you make a typo with the Caddyfile?
Audi
AudiOP6mo ago
This my folder structure , No i have download your and pasted here
No description
Audi
AudiOP6mo ago
Here is the toml file code for candy download and untar caddy [phases.caddy] dependsOn = ['setup'] # make sure this phase runs after the default 'setup' phase cmds = [ 'curl -fsSLo caddy.tar.gz "https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION}/caddy_${CADDY_VERSION}_linux_amd64.tar.gz"', # download the caddy release specified by 'CADDY_VERSION' from GitHub 'tar -zxvf caddy.tar.gz caddy', # only extract 'caddy' from the tarball 'chmod +x caddy' # enable file execution for caddy, needed to execute downloaded files ] should i change anything here due to my folder structure ?
Brody
Brody6mo ago
that says Caddyfile.txt thats also not the full nixpacks.toml file
Audi
AudiOP6mo ago
what the extention for CaddyFile ? No actullay i have just pasted caddyfile code here in discort. I have copied the entire file in my project.
Brody
Brody6mo ago
there is none
Audi
AudiOP6mo ago
Ohk got it Hey @Brody thanx but now i my live link is not working https://alluring-appreciation-production.up.railway.app this are logs : using provided configuration admin endpoint disabled automatic HTTPS is completely disabled for server started background certificate maintenance unable to get instance ID; storage clean stamps will be incomplete server running serving initial configuration cleaning storage unit finished cleaning storage units
Brody
Brody6mo ago
works fine for me? is this just a template page?
Audi
AudiOP6mo ago
No description
Audi
AudiOP6mo ago
I am getting like this No
Brody
Brody6mo ago
respectfully, a company that Amazon and AMD trusts would not be here in discord asking for help on how to host their site, it is incredibly suspicious unless this is a template page
Audi
AudiOP6mo ago
Yes its template bro
Want results from more Discord servers?
Add your server