Skip to content

Commit

Permalink
updated staging dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Hasjanov authored and Oleg Hasjanov committed Jan 16, 2024
1 parent 49b0fd3 commit 7b9f86b
Show file tree
Hide file tree
Showing 282 changed files with 751,620 additions and 28 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@

# Ignore master key for decrypting credentials and more.
/config/master.key
/public/packs
/public/packs-test
# /public/packs
# /public/packs-test
yarn-debug.log*
.yarn-integrity

/test/fixtures/files/seb_key.pem
/test/fixtures/files/seb_pub.pem
/public/packs
/public/packs-test
# /public/packs
# /public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
/public/assets/
/public/assets/builds
public/assets/builds/*
app/assets/builds/*
# /public/assets/
# /public/assets/builds
# public/assets/builds/*
# app/assets/builds/*
71 changes: 53 additions & 18 deletions Dockerfile.staging
Original file line number Diff line number Diff line change
@@ -1,24 +1,59 @@
FROM internetee/ruby:3.2.2
ARG RAILS_ENV
ARG SECRET_KEY_BASE
ARG APP_DBHOST
# FROM internetee/ruby:3.2.2
# ARG RAILS_ENV
# ARG SECRET_KEY_BASE
# ARG APP_DBHOST

ENV RAILS_ENV "$RAILS_ENV"
ENV SECRET_KEY_BASE "$SECRET_KEY_BASE"
ENV APP_DBHOST "$APP_DBHOST"
# ENV RAILS_ENV "$RAILS_ENV"
# ENV SECRET_KEY_BASE "$SECRET_KEY_BASE"
# ENV APP_DBHOST "$APP_DBHOST"

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
RUN apt-get update
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
# # RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
# # RUN apt-get update
# # RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
# # RUN apt-get install -y nodejs

# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
# RUN apt-get install -y --no-install-recommends > /dev/null \
# nodejs=* \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/*

# RUN npm install -g yarn@latest
# WORKDIR /opt/webapps/app
# # COPY Gemfile Gemfile.lock ./
# # RUN gem install bundler && bundle config set without 'development test' && bundle install --jobs 20 --retry 5
# # COPY package.json yarn.lock ./
# # RUN yarn install --check-files
# # COPY . .
# # RUN bundle exec rails assets:precompile

# COPY Rakefile Gemfile Gemfile.lock ./
# RUN gem install bundler && bundle config set without 'development test' && bundle install --jobs 20 --retry 5
# COPY package.json yarn.lock ./
# RUN yarn install --check-files

# RUN bundle exec rails assets:precompile

# EXPOSE 3000

FROM internetee/ruby:3.2.2-refactor as base

RUN npm install -g yarn@latest
WORKDIR /opt/webapps/app
COPY Gemfile Gemfile.lock ./
COPY --link Gemfile Gemfile.lock ./
RUN gem install bundler && bundle config set without 'development test' && bundle install --jobs 20 --retry 5
COPY package.json yarn.lock ./
RUN yarn install --check-files
COPY . .
RUN bundle exec rails assets:precompile
COPY --link package.json yarn.lock ./
RUN yarn install --frozen-lockfile

FROM base

RUN useradd rails
RUN mkdir -p /home/rails && chown rails:rails /home/rails

USER rails:rails

RUN mkdir -p /opt/webapps/app/tmp/pids

COPY --from=base --chown=rails:rails /usr/local/bundle /usr/local/bundle
COPY --from=base --chown=rails:rails /opt/webapps/app /opt/webapps/app

EXPOSE 3000
EXPOSE 3000
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = function(api) {
useBuiltIns: 'entry',
corejs: 3,
modules: false,
loose: true,
exclude: ['transform-typeof-symbol']
}
]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"turbolinks": "^5.2.0",
"typeface-raleway": "^1.1.13",
"url-loader": "^4.1.1",
"ws": "^8.2.1"
"ws": "^8.2.1",
"webpack": "^5.60.0"
},
"babel": {
"presets": [
Expand All @@ -66,7 +67,6 @@
"karma-qunit": "^4.1.2",
"karma-webpack": "^5.0.0",
"qunit": "^2.16.0",
"webpack": "^5.60.0",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^4.3.1"
}
Expand Down
Loading

0 comments on commit 7b9f86b

Please sign in to comment.