Skip to content

Commit

Permalink
Merge pull request #196 from OPIDoR/dmpopidor-dev
Browse files Browse the repository at this point in the history
Merge dmpopidor-dev branch
  • Loading branch information
benjaminfaure authored Nov 18, 2021
2 parents f0b76d2 + 7d709e4 commit d27f8ce
Show file tree
Hide file tree
Showing 794 changed files with 187,977 additions and 9,675 deletions.
1 change: 1 addition & 0 deletions .dockerignore
6 changes: 5 additions & 1 deletion .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,14 @@ jobs:
- name: 'Yarn Install'
run: |
yarn install
# Setup the database
- name: 'Setup Test DB'
run: bundle exec rake db:setup RAILS_ENV=test

# Migrate
- name: 'Migrate DB'
run: bundle exec rake db:migrate RAILS_ENV=test

# Compile the assets
- name: 'Compile Assets'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ config/initializers/fingerprint.rb

# ignore IDE files
.idea/*
.vscode

# Ignore MAC files
.DS_Store
Expand Down Expand Up @@ -104,3 +105,5 @@ spec/examples.txt
/node_modules
yarn-debug.log*
.yarn-integrity
reset.sh
docker
72 changes: 72 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM phusion/passenger-ruby24:1.0.19

LABEL maintainer="Benjamin FAURE benjamin.faure@inist.fr"

# Setting some env vars
ENV HOME=/root \
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 \
LANGUAGE=fr_FR.UTF-8 \
LANG=fr_FR.UTF-8 \
LC_ALL=fr_FR.UTF-8 \
RUBY_VERSION=2.4.10


# Addin Yarn repo
RUN 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

# Installing package dependencies
RUN apt-get -qqy update \
&& apt-get install vim \
build-essential \
git \
curl \
locales \
libreadline-dev \
libssl-dev \
libsqlite3-dev \
wget \
imagemagick \
xz-utils \
libcurl4-gnutls-dev \
libxrender1 \
libfontconfig1 \
apt-transport-https \
tzdata \
xfonts-base \
xfonts-75dpi \
yarn \
python \
ca-certificates -qqy \
&& rm -rf /var/lib/apt/lists/*

# Installing Node 10.x
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
RUN apt install -y nodejs

# Set locale to UTF8
RUN locale-gen --no-purge fr_FR.UTF-8 \
&& update-locale LANG=fr_FR.UTF-8 \
&& DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales

# Copying project files
COPY . /dmponline

WORKDIR /dmponline

# Installing Ruby and Node dependencies
RUN echo $RUBY_VERSION > .ruby-version \
&& gem install bundler -v 1.17.3 \
&& echo 'gem "tzinfo-data"' >> Gemfile \
# && bundle install --without mysql puma thin
&& bundle install --without mysql
RUN yarn

RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb \
&& apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb

# Run the app using the rails.sh script
COPY ./rails.sh /usr/local/bin/
RUN chmod a+x /usr/local/bin/rails.sh
# RUN mkdir -p /dmponline/public/system/dragonfly && chmod a+rw -R /dmponline/public/system/dragonfly
CMD ["rails.sh"]
Loading

0 comments on commit d27f8ce

Please sign in to comment.