R
Railway15mo 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
Percy15mo ago
Project ID: be22cca8-7c9e-4713-8b4f-d7f0bf542219
tansan
tansan15mo 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
Brody15mo ago
what do the deploy logs say?
tansan
tansan15mo 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
Brody15mo ago
have you added a database and setup all the database variable references?
tansan
tansan15mo ago
yeah and it looks like it connected to the db correctly
Brody
Brody15mo ago
can i see a screenshot of your service variables
tansan
tansan15mo ago
tansan
tansan15mo ago
Actually maybe i'm not connectd
Solution
tansan
tansan15mo ago
I copied the values from the postgres service
Brody
Brody15mo ago
thats not the correct way
tansan
tansan15mo ago
Are you saying it's not ideal or are you saying it won't work properly because the values might be different?
Brody
Brody15mo ago
both
tansan
tansan15mo ago
okay let me try it now
tansan
tansan15mo ago
@Brody So this is the expected right?
Brody
Brody15mo ago
yes but you are missing the port database variable
tansan
tansan15mo ago
Would that be diff from the default?
Brody
Brody15mo ago
yes it would
tansan
tansan15mo ago
kk
tansan
tansan15mo 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
tansan15mo ago
Deploying building now, so will see if it works soon!
Brody
Brody15mo ago
tansan
tansan15mo 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
Brody15mo ago
you see that here
tansan
tansan15mo ago
Oooo i didnt see it the first time. Does it dismiss after I add it?
Brody
Brody15mo ago
no clue
tansan
tansan15mo 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
Brody15mo ago
you'll have that on these big jobs
tansan
tansan15mo ago
okay great! its deployed! man this platform is amazing! i love the UI/UX Definitely dev like UX
Brody
Brody15mo ago
happy to hear it
tansan
tansan15mo ago
The logging is way better too
tansan
tansan15mo 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
Brody15mo ago
no problem!
Want results from more Discord servers?
Add your server