Last active
July 28, 2020 13:34
-
-
Save embasbm/0fa8c1aa469c921ddcd3 to your computer and use it in GitHub Desktop.
docker-compose failing example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: &default | |
adapter: mysql2 | |
pool: 5 | |
encoding: utf8 | |
host: db | |
username: root | |
password: password | |
development: | |
<<: *default | |
database: myapp_development | |
test: | |
<<: *default | |
database: myapp_test | |
staging: | |
<<: *default | |
database: myapp_stage | |
production: | |
<<: *default | |
database: myapp_production |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db: | |
image: mysql:latest | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
web: | |
build: . | |
command: bundle exec rails s -p 3000 -b '0.0.0.0' | |
volumes: | |
- .:/myapp | |
ports: | |
- "3000:3000" | |
links: | |
- db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.2.0 | |
RUN apt-get update -qq && apt-get install -y build-essential | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
ADD Gemfile /myapp/Gemfile | |
ADD Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
ADD . /myapp | |
EXPOSE 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker-compose build
goes finedocker-compose up
goes fine as well, even though there are some warnings:When I ran the run migration commands in other terminal this happen in the current terminal; for (docker-compose run web rake db:create:)