Skip to content

Commit

Permalink
Remove node
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Oct 19, 2023
1 parent 9af9301 commit ca55d32
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 283 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
**

# Allow only the files that are actually needed
!/package.json
!/pnpm-lock.yaml
!/Gemfile
!/Gemfile.lock
3 changes: 0 additions & 3 deletions .github/yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
extends: default

ignore: |
pnpm-lock.yaml
rules:
document-start: disable
line-length: disable
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
# Ignore master key for decrypting credentials and more.
/config/master.key

/.pnpm-store
/node_modules

config/reverser_custom_config.yml

spec/examples.txt
Expand Down
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ AllCops:
Exclude:
- bin/*
- db/schema.rb
- node_modules/**/*
- vendor/**/*
TargetRubyVersion: 3.2

Expand Down
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"files.exclude": {
".pnpm-store/": true,
"node_modules/": true,
"tmp/": true
},
"editor.tabSize": 2,
Expand Down
21 changes: 6 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ RUN if [[ $COMPOSE_PROFILES == *"solargraph"* ]]; then \
bundle exec yard gems; \
fi

FROM node:18-alpine3.18 as node-builder
FROM node:18-alpine3.18 as node-downloader

WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && corepack prepare --activate && pnpm install
RUN npm install [email protected] -g

FROM ruby:3.2.2-alpine3.18

Expand All @@ -30,17 +28,10 @@ RUN apk --no-cache add \

RUN git config --global --add safe.directory /app

# Setup node and pnpm
ENV PATH=/node_modules/.bin:$PATH
COPY --from=node-builder /usr/lib /usr/lib
COPY --from=node-builder /usr/local/share /usr/local/share
COPY --from=node-builder /usr/local/lib /usr/local/lib
COPY --from=node-builder /usr/local/include /usr/local/include
COPY --from=node-builder /usr/local/bin /usr/local/bin
COPY --from=node-builder /root/.cache/node /root/.cache/node

# Copy gems and js packages
COPY --from=node-builder /app/node_modules /node_modules
# Copy native npm package binaries
COPY --from=node-downloader /usr/local/lib/node_modules/esbuild/bin/esbuild /usr/local/bin

# Copy gems
COPY --from=ruby-builder /usr/local/bundle /usr/local/bundle

RUN echo "IRB.conf[:USE_AUTOCOMPLETE] = false" > ~/.irbrc
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
puma: bin/rails server -p 9000 -b 0.0.0.0
frontend: pnpm run build --watch=forever --color=true
frontend: esbuild app/typescript/application.ts --target=chrome111,firefox111,safari16 --bundle --sourcemap --outdir=public/build --loader:.png=file --watch=forever --color=true
good_job: bundle exec good_job --queues="scraping:1;e6_iqdb:1;variant_generation:5;default:1;submission_download:5"
2 changes: 0 additions & 2 deletions app/typescript/application.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Entry point for the build script in your package.json

import "../stylesheet/application";

import ClickMode from "./click_mode";
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ services:
- ${REVERSER_DATA_PATH:?}/active_storage:/app/public/storage
- temp:/app/tmp
tmpfs:
- /app/.pnpm-store
- /app/node_modules
- /app/tmp/cache
- /app/tmp/pids
- /app/tmp/sockets
Expand Down
12 changes: 0 additions & 12 deletions package.json

This file was deleted.

240 changes: 0 additions & 240 deletions pnpm-lock.yaml

This file was deleted.

0 comments on commit ca55d32

Please sign in to comment.