Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sourcemaps #654

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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: 1 addition & 8 deletions .docker/backend.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,10 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
COPY ./.docker/imagick-policy.xml /etc/ImageMagick-6/policy.xml

FROM node:${NODE_TAG} AS builder
WORKDIR /build
COPY package.json .
RUN npm install
COPY . .
RUN npm run build

FROM base
WORKDIR /code
ENV NODE_ENV production
COPY --from=builder /appBuild/ .
COPY ./appBuild/ .
RUN npm install --production
RUN mkdir /store && chown node:node /store
RUN mkdir /sitemap && chown node:node /sitemap
Expand Down
11 changes: 1 addition & 10 deletions .docker/frontend.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
ARG NODE_TAG=16.19.0

FROM node:${NODE_TAG} AS builder
WORKDIR /build
COPY package.json .
RUN npm install
COPY . .
RUN npm run build

FROM nginx:1.21.3
COPY --from=builder /appBuild/public/ /usr/share/nginx/html/
COPY ./appBuild/public/ /usr/share/nginx/html/
17 changes: 16 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,24 @@ jobs:
if: github.repository_owner == 'pastvu'
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.19.0

- name: Build
run: |
npm ci
npm run build

- name: Sentry
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
npm run sentry:sourcemaps

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ public/style/**/*.css

# Output from babel/transpile #
######################
babel/output*.js
babel/output*.js

# Sentry Config File
.sentryclirc

# Grunt output
appBuild
app*.zip
7 changes: 4 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module.exports = function (grunt) {
const path = require('path');
const Utils = require('./commons/Utils');
const env = grunt.option('env') || 'production'; // Например, --env testing
const upperDir = path.normalize(path.resolve('../') + '/');
const targetDir = path.normalize(upperDir + 'appBuild/');
const currentDir = path.normalize(path.resolve('./') + '/');
const targetDir = path.normalize(currentDir + 'appBuild/');
const babelConfig = require('./babel/server.config');
const hash = Utils.randomString(5);

Expand Down Expand Up @@ -103,6 +103,7 @@ module.exports = function (grunt) {
},
uglify: {
options: {
sourceMap: true,
output: {
comments: false,
},
Expand Down Expand Up @@ -220,7 +221,7 @@ module.exports = function (grunt) {
compress: {
main: {
options: {
archive: upperDir + 'app<%= pkg.version %>.zip',
archive: currentDir + 'app<%= pkg.version %>.zip',
mode: 'zip',
level: 9,
forceUTC: true,
Expand Down
Loading