R
Railway16mo ago
tansan

Starting my docker container after build

I am not sure exactly what is happening. I am re-using a Dockerfile that I used in render where the last line is CMD ["scripts/start.sh"]. Inside that script, is a line to run my migrations and start the server. However, it doesn't seem to be starting and I don't see the expected logs. I also tried adding this to my toml file, but it didn't seem to make a difference in starting my server. startCommand = "scripts/start.sh" Any suggestions?
34 Replies
Percy
Percy16mo ago
Project ID: be22cca8-7c9e-4713-8b4f-d7f0bf542219
tansan
tansanOP16mo ago
be22cca8-7c9e-4713-8b4f-d7f0bf542219 Ah I see what's happening. The deploy logs and separate from the build. Will continue to investigate.
Brody
Brody16mo ago
what do the deploy logs say?
tansan
tansanOP16mo ago
Running Migrations... 07:18:47.676 [error] Could not create schema migrations table. This error usually happens due to the following: * The database does not exist
I'm not sure why since I already migrated the db data
Brody
Brody16mo ago
have you added a database and setup all the database variable references?
tansan
tansanOP16mo ago
yeah and it looks like it connected to the db correctly
Brody
Brody16mo ago
can i see a screenshot of your service variables
tansan
tansanOP16mo ago
tansan
tansanOP16mo ago
Actually maybe i'm not connectd
Solution
tansan
tansanOP16mo ago
I copied the values from the postgres service
Brody
Brody16mo ago
thats not the correct way
tansan
tansanOP16mo ago
Are you saying it's not ideal or are you saying it won't work properly because the values might be different?
Brody
Brody16mo ago
both
tansan
tansanOP16mo ago
okay let me try it now
tansan
tansanOP16mo ago
@Brody So this is the expected right?
Brody
Brody16mo ago
yes but you are missing the port database variable
tansan
tansanOP16mo ago
Would that be diff from the default?
Brody
Brody16mo ago
yes it would
tansan
tansanOP16mo ago
kk
tansan
tansanOP16mo ago
I think if i saw a line on this page that said "Add this ENVs to your services" that I could click and it would do it for me then i would have realized there is a special way to reference it:
tansan
tansanOP16mo ago
Deploying building now, so will see if it works soon!
Brody
Brody16mo ago
tansan
tansanOP16mo ago
Where do you see that? Okay so I added my services in this order: 1. web app 2. posgres 3. worker I see that message in my worker, but not my web app unless I dismissed it without realizing kekW
Brody
Brody16mo ago
you see that here
tansan
tansanOP16mo ago
Oooo i didnt see it the first time. Does it dismiss after I add it?
Brody
Brody16mo ago
no clue
tansan
tansanOP16mo ago
Thanks for pointing that out. Really didn't notice it especially since i have an expectation for env screens and just ignored it. I "thought" i knew what i was doing, but clearly i didnt here.
Brody
Brody16mo ago
you'll have that on these big jobs
tansan
tansanOP16mo ago
okay great! its deployed! man this platform is amazing! i love the UI/UX Definitely dev like UX
Brody
Brody16mo ago
happy to hear it
tansan
tansanOP16mo ago
The logging is way better too
tansan
tansanOP16mo ago
man im bullish on this brand i love it @Brody thanks again! I have my staging up and running. Will test it out the next few weeks
Brody
Brody16mo ago
no problem!
Want results from more Discord servers?
Add your server