fix: Port 80 im Container und Alpine C++ Build-Tools für SQLite
All checks were successful
Build and Deploy / build (push) Successful in 53s
All checks were successful
Build and Deploy / build (push) Successful in 53s
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
FROM node:20-alpine
|
FROM node:20-alpine AS build
|
||||||
|
|
||||||
|
# Build-Tools für native SQLite Module (better-sqlite3)
|
||||||
|
RUN apk add --no-cache python3 make g++
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -7,7 +10,7 @@ RUN npm install --omit=dev
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 8085
|
EXPOSE 80
|
||||||
|
|
||||||
ENV PORT=8085
|
ENV PORT=80
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ services:
|
|||||||
container_name: getraenkekarte
|
container_name: getraenkekarte
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8085:8085"
|
- "8085:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data.db:/app/data.db
|
- ./data.db:/app/data.db
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const db = require('./db');
|
|||||||
const posClient = require('./posClient');
|
const posClient = require('./posClient');
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 8085;
|
const PORT = process.env.PORT || 80;
|
||||||
|
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
app.use(express.urlencoded({ extended: true }));
|
app.use(express.urlencoded({ extended: true }));
|
||||||
@@ -170,5 +170,5 @@ app.get('/admin', (req, res) => {
|
|||||||
|
|
||||||
// Server Start
|
// Server Start
|
||||||
app.listen(PORT, '0.0.0.0', () => {
|
app.listen(PORT, '0.0.0.0', () => {
|
||||||
console.log(`Server läuft auf http://localhost:${PORT}`);
|
console.log(`Server läuft auf Port ${PORT}`);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user