mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #2977 from gradido/delete-build-folders
refactor(other): delete build folders
This commit is contained in:
commit
75974632a6
@ -1,3 +1,3 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
2
admin/.gitignore
vendored
2
admin/.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
.cache/
|
||||
|
||||
/.env
|
||||
|
||||
@ -84,7 +84,7 @@ CMD /bin/sh -c "yarn run dev"
|
||||
FROM base as production
|
||||
|
||||
# Copy "binary"-files from build image
|
||||
COPY --from=build ${DOCKER_WORKDIR}/dist ./dist
|
||||
COPY --from=build ${DOCKER_WORKDIR}/build ./build
|
||||
# We also copy the node_modules express and serve-static for the run script
|
||||
COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules
|
||||
# Copy static files
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"serve": "vue-cli-service serve --open",
|
||||
"build": "vue-cli-service build",
|
||||
"dev": "yarn run serve",
|
||||
"analyse-bundle": "yarn build && webpack-bundle-analyzer dist/webpack.stats.json",
|
||||
"analyse-bundle": "yarn build && webpack-bundle-analyzer build/webpack.stats.json",
|
||||
"lint": "eslint --max-warnings=0 --ext .js,.vue,.json .",
|
||||
"stylelint": "stylelint --max-warnings=0 '**/*.{scss,vue}'",
|
||||
"test": "cross-env TZ=UTC jest",
|
||||
|
||||
@ -9,10 +9,10 @@ const port = process.env.PORT || 8080
|
||||
// Express Server
|
||||
const app = express()
|
||||
// Serve files
|
||||
app.use(express.static(path.join(__dirname, '../dist')))
|
||||
app.use(express.static(path.join(__dirname, '../build')))
|
||||
// Default to index.html
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../dist/index.html'))
|
||||
res.sendFile(path.join(__dirname, '../build/index.html'))
|
||||
})
|
||||
|
||||
app.listen(port, hostname, () => {
|
||||
|
||||
@ -49,5 +49,5 @@ module.exports = {
|
||||
// Enable CSS source maps.
|
||||
sourceMap: CONFIG.NODE_ENV !== 'production',
|
||||
},
|
||||
outputDir: path.resolve(__dirname, './dist'),
|
||||
outputDir: path.resolve(__dirname, './build'),
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ server {
|
||||
|
||||
# TODO this could be a performance optimization
|
||||
#location /vue {
|
||||
# alias /var/www/html/gradido/frontend/dist;
|
||||
# alias /var/www/html/gradido/frontend/build;
|
||||
# index index.html;
|
||||
#
|
||||
# location ~* \.(png)$ {
|
||||
|
||||
@ -103,7 +103,7 @@ server {
|
||||
|
||||
# TODO this could be a performance optimization
|
||||
#location /vue {
|
||||
# alias /var/www/html/gradido/frontend/dist;
|
||||
# alias /var/www/html/gradido/frontend/build;
|
||||
# index index.html;
|
||||
#
|
||||
# location ~* \.(png)$ {
|
||||
|
||||
@ -15,6 +15,6 @@ export NVM_DIR="/root/.nvm"
|
||||
$NPM_BIN install
|
||||
$NPM_BIN run build
|
||||
# prezip for faster deliver throw nginx
|
||||
cd dist
|
||||
cd build
|
||||
find . -type f -name "*.css" -exec gzip -9 -k {} \;
|
||||
find . -type f -name "*.js" -exec gzip -9 -k {} \;
|
||||
|
||||
@ -130,6 +130,15 @@ rm -Rf $PROJECT_ROOT/admin/node_modules
|
||||
rm -Rf $PROJECT_ROOT/dht-node/node_modules
|
||||
rm -Rf $PROJECT_ROOT/federation/node_modules
|
||||
|
||||
# Remove build folders
|
||||
# we had problems with corrupted incremtal builds
|
||||
rm -Rf $PROJECT_ROOT/database/build
|
||||
rm -Rf $PROJECT_ROOT/backend/build
|
||||
rm -Rf $PROJECT_ROOT/frontend/build
|
||||
rm -Rf $PROJECT_ROOT/admin/build
|
||||
rm -Rf $PROJECT_ROOT/dht-node/build
|
||||
rm -Rf $PROJECT_ROOT/federation/build
|
||||
|
||||
# Regenerate .env files
|
||||
cp -f $PROJECT_ROOT/database/.env $PROJECT_ROOT/database/.env.bak
|
||||
cp -f $PROJECT_ROOT/backend/.env $PROJECT_ROOT/backend/.env.bak
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
2
frontend/.gitignore
vendored
2
frontend/.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
.cache/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
|
||||
@ -84,7 +84,7 @@ CMD /bin/sh -c "yarn run dev"
|
||||
FROM base as production
|
||||
|
||||
# Copy "binary"-files from build image
|
||||
COPY --from=build ${DOCKER_WORKDIR}/dist ./dist
|
||||
COPY --from=build ${DOCKER_WORKDIR}/build ./build
|
||||
# We also copy the node_modules express and serve-static for the run script
|
||||
COPY --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules
|
||||
# Copy static files
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"serve": "vue-cli-service serve --open",
|
||||
"build": "vue-cli-service build",
|
||||
"dev": "yarn run serve",
|
||||
"analyse-bundle": "yarn build && webpack-bundle-analyzer dist/webpack.stats.json",
|
||||
"analyse-bundle": "yarn build && webpack-bundle-analyzer build/webpack.stats.json",
|
||||
"lint": "eslint --max-warnings=0 --ext .js,.vue,.json .",
|
||||
"stylelint": "stylelint --max-warnings=0 '**/*.{scss,vue}'",
|
||||
"test": "cross-env TZ=UTC jest",
|
||||
|
||||
@ -9,10 +9,10 @@ const port = process.env.PORT || 3000
|
||||
// Express Server
|
||||
const app = express()
|
||||
// Serve files
|
||||
app.use(express.static(path.join(__dirname, '../dist')))
|
||||
app.use(express.static(path.join(__dirname, '../build')))
|
||||
// Default to index.html
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../dist/index.html'))
|
||||
res.sendFile(path.join(__dirname, '../build/index.html'))
|
||||
})
|
||||
|
||||
app.listen(port, hostname, () => {
|
||||
|
||||
@ -64,5 +64,5 @@ module.exports = {
|
||||
// Enable CSS source maps.
|
||||
sourceMap: CONFIG.NODE_ENV !== 'production',
|
||||
},
|
||||
outputDir: path.resolve(__dirname, './dist'),
|
||||
outputDir: path.resolve(__dirname, './build'),
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ server {
|
||||
|
||||
# TODO this could be a performance optimization
|
||||
#location /vue {
|
||||
# alias /var/www/html/gradido/frontend/dist;
|
||||
# alias /var/www/html/gradido/frontend/build;
|
||||
# index index.html;
|
||||
#
|
||||
# location ~* \.(png)$ {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user