forked from t3-innovation-network/desm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 1.03 KB
/
Dockerfile
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
FROM ruby:3.2.2
RUN apt-get update -qq \
&& apt-get install -y curl \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get install -y cowsay \
&& apt-get update -qq \
&& apt-get install -y nodejs yarn postgresql-client \
&& rm -rf /var/lib/apt/lists/* \
&& npm rebuild node-sass
# Specify everything will happen within the /app folder inside the container
RUN mkdir /app
WORKDIR /app
# Copy Gemfile from our current application to the /app container
COPY Gemfile Gemfile.lock ./
# Install all the backend dependencies
RUN bundle install
# Install all the frontend dependencies
RUN yarn
# Copy all the files from our current application to the /app
COPY . .
# Add a script to be executed on every container start
COPY init.sh /usr/bin/
RUN chmod +x /usr/bin/init.sh
ENTRYPOINT ["init.sh"]
# Expose the port
EXPOSE 3030 1234