I was able to prepare the development environment last time Finally using Docker: Terminology, Image, Launch
In this article, start, stop, and delete the development environment Summarize the method
Run on the directory where ** docker-compose.yml ** is located
docker-compose up -d
If you start it without adding "-d" You can see the access log of the site, etc.
Stop the container with the following command
docker-compose stop
** The container itself exists ** just in the stopped state ** Execute this command to proceed with development as needed
If you want to delete the entire command instead of stopping the command Execute the following command
docker-compose down
Even if you delete it, use the docker-compose up
command
The container is created and started again
Also, if you stop with Ctrl + C
, you can see which process number Rails is running.
The recorded file (** server.pid **) remains.
I get an error the next time I start
error contents
Terminal
A server is already running. Check /app/tmp/servier.pid
If you do, delete tmp/pids/server.pid
and restart
You can restart with ** docker-compose up **
→ I tried running it with Ctrl + C
, but I was able to ** docker-compose up ** without any problems.
For the time being, refer to the reference article as a memorandum
https://www.udemy.com/course/rails-kj https://qiita.com/gold-kou/items/44860fbda1a34a001fc1 https://qiita.com/azul915/items/5b7063cbc80192343fc0
Recommended Posts