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:Jump to 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...
25 Replies
Project ID:
N/A
where to find project Id
you are trying to run a development server
"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
thats not something you would want to do, it would be costly and unstable
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
ohk i will do but i should still use build command right ?
yes
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
did you forget to copy the Caddyfile?
No i have added canddyfile
please double check
ohk i will delete the service and deploy the repo again
why?
did you make a typo with the Caddyfile?
This my folder structure , No i have download your and pasted here
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 ?
that says Caddyfile.txt
thats also not the full nixpacks.toml file
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.
there is none
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
works fine for me?
is this just a template page?
I am getting like this
No
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
Yes its template bro