Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ spec/coverage/.last_run.json
/public/uploads
/node_modules

# Ignore yarn stuff
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# Created by https://www.gitignore.io/api/intellij

Expand Down Expand Up @@ -90,7 +97,7 @@ config/environments/*.local.yml
config/docker/*/home/rails/.bundle
config/docker/*/home/rails/.cache
config/docker/*/home/rails/.local
config/docker/*/home/rails/.yarnrc
config/docker/*/home/rails/.yarn
config/docker/*/home/rails/.irb_history
config/docker/*/home/rails/.bash_history
config/docker/*/home/rails/Downloads
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarnPath: .yarn/releases/yarn-4.9.2.cjs
nodeLinker: node-modules
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
ARG RUBY_VERSION="3.4.1"
ARG BUNDLER_VERSION="2.5.6"
ARG NODEJS_VERSION="18"
ARG YARN_VERSION="1.22.10"

# Packages
ARG BUILD_PACKAGES="nodejs build-essential shared-mime-info"
ARG RUN_PACKAGES="shared-mime-info postgresql graphicsmagick"

# Scripts
ARG PRE_INSTALL_SCRIPT="curl -sL https://deb.nodesource.com/setup_${NODEJS_VERSION}.x -o /tmp/nodesource_setup.sh && bash /tmp/nodesource_setup.sh"
ARG INSTALL_SCRIPT="node -v && npm -v && npm install -g yarn && yarn set version ${YARN_VERSION}"
ARG INSTALL_SCRIPT="node -v && npm -v && corepack enable && corepack prepare yarn@stable --activate && yarn set version stable"
ARG PRE_BUILD_SCRIPT
ARG BUILD_SCRIPT="yarn install && bundle exec rake assets:precompile"
ARG POST_BUILD_SCRIPT="echo \"(built at: $(date '+%Y-%m-%d %H:%M:%S'))\" > /app-src/BUILD_INFO"
Expand Down Expand Up @@ -105,6 +104,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \

RUN bash -vxc "${INSTALL_SCRIPT:-"echo 'no INSTALL_SCRIPT provided'"}"

# Verify Corepack and Yarn
RUN corepack --version && yarn -v

# Install specific versions of dependencies
RUN gem install bundler:${BUNDLER_VERSION} --no-document

Expand All @@ -114,6 +116,10 @@ RUN gem install bundler:${BUNDLER_VERSION} --no-document
WORKDIR /app-src
COPY Gemfile Gemfile.lock ./

# Copy Yarn Berry configuration before running yarn install
COPY .yarnrc.yml ./
COPY .yarn .yarn

RUN bash -vxc "${PRE_BUILD_SCRIPT:-"echo 'no PRE_BUILD_SCRIPT provided'"}"

# install gems and build the app
Expand Down
2 changes: 1 addition & 1 deletion config/docker/development/rails-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "running bundle install"
gem install bundler -v 2.4.10
bundle install

yarn install --check-files
yarn install

if [ -z "$SKIP_RAILS_MIGRATIONS" ]; then
echo "⚙️ Performing migrations"
Expand Down
2 changes: 1 addition & 1 deletion config/docker/test/test-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "running bundle install"
gem install bundler -v 2.4.10
bundle install

yarn install --check-files
yarn install

if [ -z "$SKIP_RAILS_MIGRATIONS" ]; then
echo "⚙️ Performing migrations"
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@
t.integer "department_id"
t.string "shortname"
t.boolean "display_competence_notes_in_cv", default: true, null: false
t.boolean "reminder_mails_active", default: true
t.string "ptime_data_provider"
t.integer "ptime_employee_id"
t.boolean "reminder_mails_active", default: true
t.index ["company_id"], name: "index_people_on_company_id"
end

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
],
"engines": {
"npm": "please-use-yarn",
"yarn": ">= 1.22.0",
"yarn": ">= 4.0.0",
"node": ">= 18.16.0"
},
"devDependencies": {
"husky": "^9.0.11"
}
},
"packageManager": "yarn@4.9.2"
}
Loading
Loading