forked from loomio/loomio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (36 loc) · 1.08 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
37
38
39
40
41
42
43
44
45
46
47
#
# Warning: this image is designed to be used with docker-compose as
# instructed at https://github.com/loomio/loomio-deploy
#
# It is not a standalone image.
#
FROM ruby:2.7.6
ENV REFRESHED_AT 2020-12-22
ENV BUNDLE_BUILD__SASSC=--disable-march-tune-native
ENV MALLOC_ARENA_MAX=2
RUN gem update --system
RUN apt-get update -qq && apt-get install -y build-essential sudo apt-utils
# for activestorage previews
RUN apt-get install -y imagemagick ffmpeg mupdf libvips
# for postgres
RUN apt-get install -y libpq-dev
# for nokogiri
RUN apt-get install -y libxml2-dev libxslt1-dev
# for node
# RUN apt-get install -y python python-dev python-pip python-virtualenv
# install node
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
RUN apt-get install -y nodejs
RUN gem install bundler
# RUN mkdir /loomio
WORKDIR /loomio
ADD . /loomio
COPY config/database.docker.yml /loomio/config/database.yml
RUN bundle install
WORKDIR /loomio/vue
RUN npm install
RUN npm run build
WORKDIR /loomio
EXPOSE 3000
# source the config file and run puma when the container starts
CMD /loomio/docker_start.sh