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
|
||||
|
||||
@@ -7,7 +10,7 @@ RUN npm install --omit=dev
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8085
|
||||
EXPOSE 80
|
||||
|
||||
ENV PORT=8085
|
||||
ENV PORT=80
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -5,6 +5,6 @@ services:
|
||||
container_name: getraenkekarte
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8085:8085"
|
||||
- "8085:80"
|
||||
volumes:
|
||||
- ./data.db:/app/data.db
|
||||
|
||||
@@ -7,7 +7,7 @@ const db = require('./db');
|
||||
const posClient = require('./posClient');
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 8085;
|
||||
const PORT = process.env.PORT || 80;
|
||||
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
@@ -170,5 +170,5 @@ app.get('/admin', (req, res) => {
|
||||
|
||||
// Server Start
|
||||
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