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