(Host OS) windows10

I want to start the server with docker and access localhost
"Unable to access this site. Connection refused on localhost."
Will be said.

docker-compose up
Starting myapp_db_1 ... done
Starting myapp_web_1 ... done
Attaching to myapp_db_1, myapp_web_1
db_1 |
db_1 | PostgreSQL Database directory appears to contain a database;Skipping initialization
db_1 |
db_1 | 2020-09-27 09: 05: 55.252 UTC [1] LOG: starting PostgreSQL 13.0 (Debian 13.0-1.pgdg100 + 1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) ) 8.3.0, 64-bit
db_1 | 2020-09-27 09: 05: 55.253 UTC [1] LOG: listening on IPv4 address "", port 5432
db_1 | 2020-09-27 09: 05: 55.254 UTC [1] LOG: listening on IPv6 address "::", port 5432
db_1 | 2020-09-27 09: 05: 55.260 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1 | 2020-09-27 09: 05: 55.266 UTC [24] LOG: database system was shut down at 2020-09-27 09:05:46 UTC
web_1 | =>Booting Puma
web_1 | =>Rails application starting in development
web_1 | =>Run `rails server --help` for more startup options
web_1 | Puma starting in single mode ...
web_1 | * Version 4.3.6 (ruby 2.7.1-p83), codename: Mysterious Traveler
web_1 | * Min threads: 5, max threads: 5
web_1 | * Environment: development
web_1 | * Listening on tcp: //

Probably due to "database system was shut down at 2020-09-27 08:48:28 UTC" but I don't know how to fix it. Please give me some advice.

docker-compose ps
The specified path can not be found.
     Name Command State Ports
-------------------------------------------------- -------------------------------
myapp_db_1 docker-entrypoint.sh postgres Up 5432/tcp
myapp_web_1 entrypoint.sh bundle exec ... Up>3000/tcp
FROM ruby: 2.7.1
RUN apt-get update -qq&&apt-get install -y nodejs postgresql-client
RUN apt-get update&&apt-get install -y curl apt-transport-https wget&&\
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add-&&\
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list&&\
apt-get update&&apt install -y yarn
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash-&&\
apt-get install nodejs
RUN mkdir/myapp
COPY Gemfile/myapp/Gemfile
COPY Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
# Add a script to be executed every time the container starts.
COPY entrypoint.sh /usr/bin/
RUN chmod + x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
#Start the main process.
CMD ["rails", "server", "-b", ""]
version: '3'
services: services:
    image: postgres
    environment: environment:
      POSTGRES_PASSWORD: 3246xkxh
    build: ..
    command: ["bundle", "exec", "rails", "s", "-p", "3000", "-b", ""]
    ports: ports:
      -"3000: 3000"
    external: true
  • Answer # 1

    For docker toolbox

    docker-machine ip default

    Check the IP address with
    http: //: 3000 /
    Should have done

    Instead, I got the error Webpacker :: Manifest :: MissingEntryError. I have another question.

  • Answer # 2

    if,web_postgreIf you don't have the data you need inside
    Wouldn't it improve if you delete the contents and restart it?

    docker-compose down -v
    rm -rf web_postgre
    docker-compose up

    Reference: docker-compose down | Docker documentation

    If this improves,
    For some reasonweb_postgreIt is possible that the data in was in an abnormal state.