diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..252997d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +log/* +tmp/* +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..486fbfa --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM ruby:3.1.2-alpine + +RUN apk add build-base libpq-dev tzdata + +WORKDIR /app +ADD Gemfile* ./ + +RUN bundle + +ADD . ./ + +CMD ["./entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..6d265b1 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +bin/rails db:migrate && +bin/rails server