First article posting.
After confirming that the rails app was connected with the url of "localhost: 3000" in the browser with Docker-compose up and leaving it for a day, it was not displayed in the browser even if I tried to connect or updated it.
I deleted the docker container, recreated it, and started it.
Docker-compose down
Docker-compose build
Docker-compose up -d
In the last line
rails_web_1 exited with code 1
So when I look at the container state
docker-compose ps
Name Command State Ports
-------------------------------------------------------------
rails_db_1 docker-entrypoint.sh mysqld Exit 0
rails_web_1 bundle exec rails s -p 300 ... Up
When I was in trouble because State did not become Up, I thought that there was a possibility that I deleted the entire DB, so I created a DB again and tried to upload it.
docker-compose run web bundle exec rake db:create
docker-compose up
Then I was able to display rails in the browser! !! ↓ Server is running
web_1 | Use Ctrl-C to stop
Recommended Posts