mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
Fix deploy (#183)
This commit is contained in:
3 files changed
+23
-13
No files matched your search
@@ -1,5 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
error_log /var/log/nginx/error.log debug;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
@@ -10,15 +11,29 @@ server {
|
||||
location /api/ {
|
||||
proxy_pass http://backend:3000;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location /trpc/ {
|
||||
proxy_pass http://backend:3000;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location /api-docs/ {
|
||||
proxy_pass http://backend:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /socket.io/ {
|
||||
@@ -28,5 +43,9 @@ server {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -5,7 +5,6 @@ COPY ./package.json yarn.lock ./
|
||||
COPY server/package.json ./server/package.json
|
||||
RUN yarn install
|
||||
# Install docker cli
|
||||
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
|
||||
COPY server ./server
|
||||
COPY packages ./packages
|
||||
COPY tsconfig.json ./tsconfig.json
|
||||
@@ -15,6 +14,7 @@ RUN yarn workspace server build
|
||||
FROM node:20-alpine as prod
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/server ./server
|
||||
COPY ./quests ./quests
|
||||
|
||||
@@ -23,19 +23,10 @@ const logger = winston.createLogger({
|
||||
dirname: config.log.path,
|
||||
filename: 'combined.log',
|
||||
}),
|
||||
new winston.transports.Console({
|
||||
format: winston.format.simple(),
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
//
|
||||
// If we're not in production then log to the `console` with the format:
|
||||
// `${info.level}: ${info.message} JSON.stringify({ ...rest }) `
|
||||
//
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
logger.add(
|
||||
new winston.transports.Console({
|
||||
format: winston.format.simple(),
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
export default logger
|
||||
Reference in new issue
Block a user