forked from doubtfire-lms/doubtfire-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployApi.Dockerfile
More file actions
37 lines (29 loc) · 755 Bytes
/
deployApi.Dockerfile
File metadata and controls
37 lines (29 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# deployApi.Dockerfile - the container used to host the API only
#
FROM ruby:3.1-bullseye
# Setup dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
bc \
ffmpeg \
ghostscript \
imagemagick \
libmagic-dev \
libmagickwand-dev \
libmariadb-dev \
tzdata
# Setup the folder where we will deploy the code
WORKDIR /doubtfire
# Copy doubtfire-api source
COPY . /doubtfire/
# Install bundler
RUN gem install bundler -v '~> 2.2.0'
RUN bundle config set --global without development test staging
# Install the Gems
RUN bundle install
EXPOSE 3000
# Set default to production
ENV RAILS_ENV production
# Run migrate and server on launch
CMD bundle exec rake db:migrate && bundle exec rails s -b 0.0.0.0