27 Commits

Author SHA1 Message Date
Dome 05ebb904b2 Add files via upload 2025-03-28 16:24:32 +01:00
Dome 73200e8c27 Update compose.yaml 2025-03-28 16:23:32 +01:00
Dome 27ff8f19c7 Update Dockerfile 2025-03-28 16:23:19 +01:00
Dome 8124698775 Update README.md 2025-03-28 16:22:52 +01:00
Dome 58890a7c9d Update Dockerfile 2025-03-28 14:52:15 +01:00
Dome 521b2adf67 Update Dockerfile 2025-03-28 14:49:27 +01:00
Dome 84db9ecc9e Update Dockerfile 2025-03-28 14:48:24 +01:00
Dome b75ca64d22 Update README.md 2025-03-28 14:43:32 +01:00
Dome 8fee384fc0 Update compose.yaml 2025-03-28 14:43:16 +01:00
Dome 8c2db8fdc5 Update README.md 2025-03-28 14:41:22 +01:00
Dome bda105ceeb Update compose.yaml 2025-03-28 14:41:04 +01:00
Dome 4e4e034db2 Update Dockerfile 2025-03-28 14:40:47 +01:00
Dome b8047a7988 Update Dockerfile 2025-03-28 14:34:21 +01:00
Dome ef85f6782d Update Dockerfile 2025-03-28 14:33:46 +01:00
Dome 46a14f0e46 Update Dockerfile 2025-03-28 14:29:04 +01:00
Dome ed1230eee8 Update Dockerfile 2025-03-28 14:24:39 +01:00
Dome 334393b9de Update Dockerfile 2025-03-28 14:22:19 +01:00
Dome 684f3f70dd Update Dockerfile 2025-03-28 14:18:21 +01:00
Dome 70b5a4979d Update Dockerfile 2025-03-28 14:04:49 +01:00
Dome 1898808f79 Update README.md 2025-03-28 13:51:57 +01:00
Dome df2c426d76 Update compose.yaml 2025-03-28 13:49:34 +01:00
Dome f04e9484e7 Update Dockerfile 2025-03-28 13:45:30 +01:00
Dome 3fa1ad7269 Update README.md 2025-03-28 13:44:59 +01:00
Dome 66cc550949 Update Dockerfile 2025-03-28 13:38:35 +01:00
Dome 3a0359c1b6 Update compose.yaml 2025-03-28 13:32:08 +01:00
Dome b560e2dc1e Update Dockerfile 2025-03-28 13:27:33 +01:00
Dome 8abc0ce856 Create docker-image.yml 2025-03-28 11:53:11 +01:00
5 changed files with 101 additions and 24 deletions
+29
View File
@@ -0,0 +1,29 @@
name: Build and Push Matrix-to Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
push: true
tags: domoel/matrix-to:latest
+18 -14
View File
@@ -1,19 +1,23 @@
# Verwenden Sie ein Node.js-Image als Basis
FROM node:20-alpine
# Setzen Sie das Arbeitsverzeichnis im Container
# Stage 1: Build
FROM node:20.2-alpine AS build
WORKDIR /app
# Kopieren Sie die package.json und yarn.lock Dateien und installieren Sie die Abhängigkeiten
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Kopieren Sie den Rest des Codes in das Arbeitsverzeichnis
RUN yarn install
COPY . .
RUN yarn build
# Exponieren Sie den Port 5000
EXPOSE 5000
# Stage 2: Production
FROM nginx:alpine
WORKDIR /etc/nginx
COPY ./nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
COPY --from=build /app/build .
# Starten Sie die Anwendung und setzen Sie die PORT-Umgebungsvariable auf 5000
ENV PORT=5000
CMD ["yarn", "start"]
# Expose port 80
EXPOSE 80
# Healthcheck
HEALTHCHECK CMD curl --fail http://localhost:80 || exit 1
# Start Nginx server
CMD ["nginx", "-g", "daemon off;"]
+10 -5
View File
@@ -93,12 +93,17 @@ You can discuss matrix.to in
version: '3.8'
services:
matrix-to:
container_name: Matrix-to
web:
image: domoel/matrix-to:latest
ports:
- "5000:5000"
restart: unless-stopped
- "1336:80"
environment:
- PORT=5000
- NODE_ENV=production
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
```
+10 -5
View File
@@ -1,11 +1,16 @@
version: '3.8'
services:
matrix-to:
container_name: Matrix-to
web:
image: domoel/matrix-to:latest
ports:
- "5000:5000"
restart: unless-stopped
- "1336:80"
environment:
- PORT=5000
- NODE_ENV=production
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
+34
View File
@@ -0,0 +1,34 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}