Modernise & deploy #1

Merged
andras merged 25 commits from asch/modernise into master 2026-05-31 16:48:45 +01:00
128 changed files with 1185 additions and 0 deletions
Showing only changes of commit 3ad2766f82 - Show all commits

1
.dockerignore Normal file
View file

@ -0,0 +1 @@
**/node_modules

25
Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM schmelczera/error-pages as build-error-pages
RUN python build.py 401 403 404 502 50x
FROM node:latest as build-webpage
WORKDIR /home/node
COPY frontend .
RUN npm install
RUN npm run build
FROM nginx:alpine
WORKDIR /var/www
RUN rm -rf *
COPY --from=build-error-pages /home/python/built errors
COPY --from=build-webpage /home/node/dist/frontend .
RUN find . -type f | xargs gzip -k9 &&\
chmod -R 555 .
VOLUME ["/var/www/sockets"]
COPY ingress/nginx-config /etc/nginx/

83
docker-compose.yml Normal file
View file

@ -0,0 +1,83 @@
version: "3.8"
services:
towers-ingress:
init: true
depends_on:
- store
image: schmelczera/towers-ingress
networks:
- network
deploy:
replicas: 1
resources:
limits:
cpus: "0.2"
memory: 32M
reservations:
cpus: "0.1"
memory: 16M
placement:
constraints:
- "node.hostname == node-2"
update_config:
parallelism: 1
failure_action: rollback
delay: 10s
monitor: 10s
restart_policy:
condition: on-failure
window: 30s
volumes:
- sockets:/var/www/sockets
towers-store:
init: true
image: schmelczera/towers-store
networks:
- network
deploy:
replicas: 1
resources:
limits:
cpus: "0.2"
memory: 64M
reservations:
cpus: "0.05"
memory: 32M
placement:
constraints:
- "node.hostname == node-2"
restart_policy:
condition: on-failure
window: 30s
volumes:
- sockets:/home/backend/sockets
towers-db:
init: true
image: postgres:12.1-alpine
networks:
- network
deploy:
replicas: 1
resources:
limits:
cpus: "0.2"
memory: 64M
reservations:
cpus: "0.05"
memory: 32M
restart_policy:
condition: on-failure
window: 30s
volumes:
- /shared/towers/db:/var/lib/postgresql/data
networks:
network:
driver: overlay
volumes:
sockets:
driver: local

0
.editorconfig → frontend/.editorconfig Executable file → Normal file
View file

0
.gitignore → frontend/.gitignore vendored Executable file → Normal file
View file

0
.prettierrc → frontend/.prettierrc Executable file → Normal file
View file

0
README.md → frontend/README.md Executable file → Normal file
View file

0
angular.json → frontend/angular.json Executable file → Normal file
View file

0
firebase.json → frontend/firebase.json Executable file → Normal file
View file

0
package-lock.json → frontend/package-lock.json generated Executable file → Normal file
View file

0
package.json → frontend/package.json Executable file → Normal file
View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

0
src/app/utils/top.ts → frontend/src/app/utils/top.ts Executable file → Normal file
View file

0
src/assets/.gitkeep → frontend/src/assets/.gitkeep Executable file → Normal file
View file

0
src/assets/arrow.svg → frontend/src/assets/arrow.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 746 B

Before After
Before After

0
src/assets/pen.svg → frontend/src/assets/pen.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 737 B

After

Width:  |  Height:  |  Size: 737 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

0
src/assets/trash.svg → frontend/src/assets/trash.svg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 816 B

After

Width:  |  Height:  |  Size: 816 B

Before After
Before After

0
src/browserslist → frontend/src/browserslist Executable file → Normal file
View file

0
src/favicon.ico → frontend/src/favicon.ico Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

0
src/index.html → frontend/src/index.html Executable file → Normal file
View file

0
src/karma.conf.js → frontend/src/karma.conf.js Executable file → Normal file
View file

View file

View file

Some files were not shown because too many files have changed in this diff Show more