Skip to content

Commit

Permalink
Merge pull request #610 from zmariscal/chore--add-docker-and-docker-c…
Browse files Browse the repository at this point in the history
…ompose-files

Add docker and docker compose files
  • Loading branch information
cfis authored Oct 27, 2023
2 parents ccd0cf3 + 0c94632 commit f36508e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use the official Ruby 3.2 image as a base image
ARG RUBY_VERSION=3.2
FROM ruby:${RUBY_VERSION}-bullseye

# Set the working directory
WORKDIR /usr/src/app

# Install system packages
RUN apt-get update -qq && \
apt-get install -y default-mysql-client postgresql postgresql-contrib vim && \
apt-get clean

# Copy all files
COPY . .

RUN bundler config set --local without "db2 oracle sqlserver sqlite postgresql"
# Move sample database.yml and install gems
RUN mv test/connections/databases.example.yml test/connections/databases.yml && \
bundle install

CMD ["irb"]
26 changes: 26 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3.5"

services:
mysql:
platform: linux/x86_64
image: mysql:5.7
volumes:
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=root

app:
build:
context: .
environment:
DB_HOST: mysql
volumes:
- .:/usr/src/app
depends_on:
- mysql
command: tail -f /dev/null

volumes:
mysql-data:

0 comments on commit f36508e

Please sign in to comment.