exited with code 1 error resolution with docker-compose up in rails environment

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

Hellorails.jpeg

Recommended Posts

exited with code 1 error resolution with docker-compose up in rails environment
[Rails] Error resolution when generating tokens with PAYJP
500 Internal Server Error occurs in Rails production environment
Error deploying rails5 + Mysql to heroku with Docker-compose
rails error resolution summary
Migration error after Activerecord association in Rails5 + Docker environment (2)
Stable development environment construction manual for "Rails6" with "Docker-compose"
Migration error after Activerecord association in Rails5 + Docker environment
Write beautiful code with indentation in mind (rails, html)
Environment construction of Rails5 + MySQL8.0 + top-level volumes with docker-compose
Japaneseize using i18n with Rails
Error in rails db: migrate
[Docker] Rails 5.2 environment construction with docker
Exit code 1 occurs when Rails is stopped in Docker environment
[Docker] The story that an error occurred in docker-compose up
Can't output PDF in production environment (EC2, Amazon Linux) with Rails
Rails + MySQL environment construction with Docker
Java Spring environment in vs Code
[Rails] Unexpected validation error in devise
Build environment with vue.js + rails + docker
[Rails] How to speed up docker-compose
Build Rails environment with Docker Compose
Create Laravel environment with Docker (docker-compose)
[Environment construction with Docker] Rails 6 & MySQL 8
[Rails 6] Customize Bootstrap in Rails + Bootstrap 5.0.0-alpha environment
Commit failed exit code 1 error resolution
A record of setting up a Java development environment with Visual Studio Code
[Rails] About the error that the image is not displayed in the production environment
Alert slack with alert manager in Docker environment
Generate Dart client code with Rails + apipie
Prepare Java development environment with VS Code
Building Rails 6 and PostgreSQL environment with Docker
Build and manage RStudio environment with Docker-compose
Create Rails 6 + MySQL environment with Docker compose
Prepare the format environment with "Rails" (VScode)
Edit Mysql with commands in Docker environment
Rails API server environment construction using docker-compose
Show Better Errors in Rails + Docker environment
Build Nuxt TypeScript + Vuetify environment with docker-compose
rails test fails with database reference error
[Rails] Reset the database in the production environment
Let's make an error screen with Rails
[Rails / Heroku] Error resolution procedure after push
How to build Rails 6 environment with Docker
Dealing with NameError: uninitialized constant :: Analyzable error when installing Active Storage in Rails6
[Error resolution] Occurs when trying to build an environment for spring with docker
How to send custom metrics and events to datadog with laravel in docker-compose environment
"Debugger terminal error: Process failed: spawn bundle ENOENT" in Windows VS Code environment
How to deal with the error yaml.scanner.ScannerError: while scanning for the next token that appeared in Rails environment construction with Docker