Skip to content

Commit dc01151

Browse files
authored
Update versions and replace rollbar with sentry (#58)
1 parent cc5f734 commit dc01151

File tree

23 files changed

+1837
-2170
lines changed

23 files changed

+1837
-2170
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: CI
22

3-
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
3+
on: [push, pull_request]
84

95
jobs:
106
test:
@@ -16,8 +12,8 @@ jobs:
1612

1713
- uses: erlef/setup-elixir@v1
1814
with:
19-
otp-version: 25.2.1
20-
elixir-version: 1.14.3
15+
otp-version: 27.2
16+
elixir-version: 1.17.3
2117

2218
- run: mix deps.get
2319
- run: mix deps.compile

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
FROM hexpm/elixir:1.14.3-erlang-25.2.1-alpine-3.17.0 as build
1+
ARG ELIXIR_VERSION=1.17.3
2+
ARG ERLANG_VERSION=27.2
3+
ARG ALPINE_VERSION=3.20.3
4+
5+
FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${ERLANG_VERSION}-alpine-${ALPINE_VERSION} AS build
26

37
# install build dependencies
48
RUN apk add --update git build-base nodejs yarn
@@ -32,11 +36,11 @@ RUN mix compile
3236

3337
# build release
3438
COPY rel rel
35-
RUN mix release
39+
RUN mix do sentry.package_source_code, release
3640

3741
# prepare release image
38-
FROM alpine:3.17.0 AS app
39-
RUN apk add --update bash openssl libstdc++
42+
FROM alpine:${ALPINE_VERSION} AS app
43+
RUN apk add --no-cache --update bash openssl libstdc++
4044

4145
RUN mkdir /app
4246
WORKDIR /app

assets/package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313
"phoenix_live_view": "file:../deps/phoenix_live_view"
1414
},
1515
"devDependencies": {
16-
"@babel/core": "^7.0.0",
17-
"@babel/preset-env": "^7.0.0",
18-
"babel-loader": "^8.0.0",
19-
"copy-webpack-plugin": "^11.0.0",
20-
"css-loader": "^3.4.2",
21-
"css-minimizer-webpack-plugin": "^4.2.2",
22-
"mini-css-extract-plugin": "^2.7.2",
23-
"sass": "^1.35.2",
24-
"sass-loader": "^8.0.2",
25-
"terser-webpack-plugin": "^2.3.2",
26-
"webpack": "^5.1.0",
27-
"webpack-cli": "^4.x.x"
16+
"@babel/core": "^7.24.4",
17+
"@babel/preset-env": "^7.24.4",
18+
"babel-loader": "^9.1.3",
19+
"copy-webpack-plugin": "^12.0.2",
20+
"css-loader": "^7.1.1",
21+
"css-minimizer-webpack-plugin": "^6.0.0",
22+
"mini-css-extract-plugin": "^2.8.1",
23+
"sass-loader": "^14.2.0",
24+
"sass": "^1.74.1",
25+
"webpack-cli": "^5.1.4",
26+
"webpack": "5.91.0"
2827
}
2928
}

assets/webpack.config.js

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,46 @@
11
const path = require('path');
2-
const glob = require('glob');
32
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
43
const TerserPlugin = require('terser-webpack-plugin');
54
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
65
const CopyWebpackPlugin = require('copy-webpack-plugin');
76

87
module.exports = (env, options) => {
9-
const devMode = options.mode !== 'production';
10-
118
return {
129
optimization: {
1310
minimizer: [
14-
new TerserPlugin({ cache: true, parallel: true, sourceMap: devMode }),
11+
new TerserPlugin(),
1512
new CssMinimizerPlugin(),
1613
]
1714
},
18-
entry: {
19-
'app': glob.sync('./vendor/**/*.js').concat(['./js/app.js'])
20-
},
15+
entry: [
16+
'./js/app.js'
17+
],
2118
output: {
22-
filename: '[name].js',
23-
path: path.resolve(__dirname, '../priv/static/js'),
24-
publicPath: '/js/',
19+
filename: 'js/app.js',
20+
path: path.resolve(__dirname, '../priv/static'),
2521
},
26-
mode: devMode ? 'development' : 'production',
27-
devtool: devMode ? 'eval-cheap-module-source-map' : undefined,
2822
module: {
2923
rules: [
3024
{
31-
test: /\.js$/,
32-
exclude: /node_modules/,
33-
use: {
34-
loader: 'babel-loader'
35-
}
36-
},
37-
{
38-
test: /\.[s]?css$/,
25+
test: /\.scss$/,
3926
use: [
4027
MiniCssExtractPlugin.loader,
41-
'css-loader',
42-
'sass-loader',
43-
],
28+
{
29+
loader: "css-loader",
30+
options: { url: false }
31+
},
32+
"sass-loader"
33+
]
34+
},
35+
{
36+
test: /\.css$/,
37+
use: [MiniCssExtractPlugin.loader, 'css-loader']
4438
}
4539
]
4640
},
4741
plugins: [
48-
new MiniCssExtractPlugin({ filename: '../css/app.css' }),
49-
new CopyWebpackPlugin({ patterns: [{ from: 'static/', to: '../' }] })
42+
new MiniCssExtractPlugin({ filename: 'css/app.css' }),
43+
new CopyWebpackPlugin({ patterns: [{ from: 'static/', to: '.' }] }),
5044
]
5145
}
5246
};

0 commit comments

Comments
 (0)