init
This commit is contained in:
25
.aiignore
Normal file
25
.aiignore
Normal file
@@ -0,0 +1,25 @@
|
||||
# An .aiignore file follows the same syntax as a .gitignore file.
|
||||
# .gitignore documentation: https://git-scm.com/docs/gitignore
|
||||
|
||||
# you can ignore files
|
||||
.DS_Store
|
||||
*.log
|
||||
*.tmp
|
||||
|
||||
# or folders
|
||||
dist/
|
||||
build/
|
||||
out/
|
||||
# An .aiignore file follows the same syntax as a .gitignore file.
|
||||
# .gitignore documentation: https://git-scm.com/docs/gitignore
|
||||
|
||||
# you can ignore files
|
||||
# or folders
|
||||
.idea
|
||||
node_modules/
|
||||
.vscode/
|
||||
.git
|
||||
.github
|
||||
scripts
|
||||
.pytest_cache/
|
||||
__pycache__
|
||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
# Simple static site image: serve the contents of /public with nginx
|
||||
FROM nginx:alpine
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# Copy static files
|
||||
COPY public/ ./
|
||||
|
||||
# If the site references additional resources, copy them too
|
||||
COPY resources/ ./resources
|
||||
|
||||
# Provide custom nginx.conf for clean URLs
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
35
docker-compose.yml
Normal file
35
docker-compose.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
services:
|
||||
word:
|
||||
build:
|
||||
context: /opt/apps/word
|
||||
dockerfile: Dockerfile
|
||||
container_name: word
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- traefik_net
|
||||
- default
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.word.rule=Host(`word.appmodel.nl`)"
|
||||
- "traefik.http.routers.word.entrypoints=websecure"
|
||||
- "traefik.http.routers.word.tls=true"
|
||||
- "traefik.http.services.word.loadbalancer.server.port=80"
|
||||
- "traefik.http.routers.word-http.rule=Host(`word.appmodel.nl`)"
|
||||
- "traefik.http.routers.word-http.entrypoints=web"
|
||||
- "traefik.http.routers.word-http.middlewares=word-https"
|
||||
- "traefik.http.middlewares.word-https.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.auction.tls.certresolver=letsencrypt",
|
||||
- "traefik.http.middlewares.word-https.redirectscheme.permanent=true"
|
||||
|
||||
healthcheck:
|
||||
test: [ "CMD", "node", "-e", "require('http').get('http://localhost:3001/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1); }).on('error', () => process.exit(1));" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
|
||||
networks:
|
||||
traefik_net:
|
||||
external: true
|
||||
name: traefik_net
|
||||
0
js/vendor/.gitkeep
vendored
0
js/vendor/.gitkeep
vendored
22
nginx.conf
Normal file
22
nginx.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Enable clean URLs without .html extension
|
||||
location / {
|
||||
# Try the exact URI, then with .html, then as directory with index.html, then 404
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
|
||||
# Optional: Redirect .html URLs to clean URLs
|
||||
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
|
||||
return 301 /$1$2;
|
||||
}
|
||||
|
||||
# Gzip compression for better performance
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
const path = require('path');
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
app: './js/app.js',
|
||||
entry : {
|
||||
app: './js/app.js'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
clean: true,
|
||||
filename: './js/app.js',
|
||||
},
|
||||
};
|
||||
path : path.resolve(__dirname, 'dist'),
|
||||
clean : true,
|
||||
filename: './js/app.js'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.common.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
mode : 'development',
|
||||
devtool : 'inline-source-map',
|
||||
devServer: {
|
||||
liveReload: true,
|
||||
hot: true,
|
||||
open: true,
|
||||
static: ['./'],
|
||||
},
|
||||
});
|
||||
hot : true,
|
||||
open : true,
|
||||
static : ['./']
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const { merge } = require('webpack-merge')
|
||||
const common = require('./webpack.common.js')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const CopyPlugin = require('copy-webpack-plugin')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
mode : 'production',
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: './index.html',
|
||||
template: './index.html'
|
||||
}),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
@@ -19,8 +19,8 @@ module.exports = merge(common, {
|
||||
{ from: 'robots.txt', to: 'robots.txt' },
|
||||
{ from: 'icon.png', to: 'icon.png' },
|
||||
{ from: '404.html', to: '404.html' },
|
||||
{ from: 'site.webmanifest', to: 'site.webmanifest' },
|
||||
],
|
||||
}),
|
||||
],
|
||||
});
|
||||
{ from: 'site.webmanifest', to: 'site.webmanifest' }
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user