I used docker-compose up and it gave me Mysql2::Error: Unknown MySQL server host 'expvipdb' (-2) with the following docker-compose.yml file:
expvip:
build: .
restart: always
ports:
- "80:80"
links:
- expvipdb
- exvip_mongo
volumes:
- ./data/:/db
expvipdb:
image: mariadb
restart: always
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=expvip
- MYSQL_USER=expvipUSR
- MYSQL_PASSWORD=expvipPWD
ports:
- "3306:3306"
volumes:
- ./mysql/:/docker-entrypoint-initdb.d
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
links:
- expvipdb
ports:
- 8183:80
environment:
PMA_USER: root
PMA_PASSWORD: admin
PMA_ARBITRARY: 1
exvip_mongo:
image: mongo
restart: always
ports:
- 27017:27017
volumes:
- ./mongo/:/mongo
and the Dockerfile for exvip looks like this:
FROM debian:stretch-backports
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ruby ruby-dev \
curl wget \
gnupg \
git \
ncbi-blast+ \
libmariadbclient-dev \
libsqlite3-dev \
zlib1g-dev && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
apt-get update && apt-get install -y --no-install-recommends \
nodejs npm && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV EXPVIP_VERSION Release-2018-07-17
cd expvip-web && \
sed -i.bak "s|localhost|expvipdb|" config/database.yml && \
sed -i.bak "s|:num_threads: 1|:num_threads: 4|" config/sequenceserver.conf && \
sed -i.bak "s|/Volumes/homonecloco/References|/db|" config/sequenceserver.conf && \
gem install bundler && \
bundle install && \
rake db:migrate
default: &default
adapter: mysql2
encoding: utf8
database: expvipdb
username: expvipUSR
password: expvipPWD
host: expvipdb
port: 3306
development:
<<: *default
database: "wheat_expression_dev"
# database: "expvip_berries"
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: "wheat_expression_test"
#production:
# <<: *default
# database: "wheat_expression_prd"
#production:
# <<: *default
# database: db/production.sqlite3
What did I miss?
Thank you in advance