Merge branch 'master' of ssh://mnml-studios:/home/ntr/mcrates
This commit is contained in:
commit
986b61962a
5 files changed
+80
-1
No files matched your search
@@ -0,0 +1,4 @@
|
|||||||
|
FROM node:16
|
||||||
|
WORKDIR /opt/crates/api
|
||||||
|
COPY . ./
|
||||||
|
CMD ["npm", "start"]
|
||||||
@@ -70,7 +70,7 @@ export default function authRouter(log, pg: Pg, events) {
|
|||||||
id: user.id,
|
id: user.id,
|
||||||
email: user.email,
|
email: user.email,
|
||||||
};
|
};
|
||||||
events.emit(Events.DiscordMessage, { msg: 'user registere', email: user.email });
|
events.emit(Events.DiscordMessage, { msg: 'user register', email: user.email });
|
||||||
});
|
});
|
||||||
|
|
||||||
return { authRouter, passport };
|
return { authRouter, passport };
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# build step
|
||||||
|
FROM node:16 AS build-env
|
||||||
|
WORKDIR /opt/crates/client
|
||||||
|
|
||||||
|
COPY . ./
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# static server
|
||||||
|
FROM nginx
|
||||||
|
WORKDIR /srv/app
|
||||||
|
COPY --from=build-env /opt/crates/client/build /srv/app
|
||||||
|
COPY ./client.nginx.conf /etc/nginx/nginx.conf
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
sendfile on;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
listen [::]:8080;
|
||||||
|
|
||||||
|
autoindex off;
|
||||||
|
|
||||||
|
root /srv/app;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_min_length 256;
|
||||||
|
gzip_types
|
||||||
|
application/atom+xml
|
||||||
|
application/geo+json
|
||||||
|
application/javascript
|
||||||
|
application/x-javascript
|
||||||
|
application/json
|
||||||
|
application/ld+json
|
||||||
|
application/manifest+json
|
||||||
|
application/rdf+xml
|
||||||
|
application/rss+xml
|
||||||
|
application/xhtml+xml
|
||||||
|
application/xml
|
||||||
|
font/eot
|
||||||
|
font/otf
|
||||||
|
font/ttf
|
||||||
|
image/svg+xml
|
||||||
|
text/css
|
||||||
|
text/javascript
|
||||||
|
text/plain
|
||||||
|
text/xml;
|
||||||
|
|
||||||
|
error_page 404 /;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
version: "3.3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
client:
|
||||||
|
image: crates-client
|
||||||
|
build:
|
||||||
|
context: ./client
|
||||||
|
dockerfile: ./client.Dockerfile
|
||||||
|
|
||||||
|
api:
|
||||||
|
image: crates-api
|
||||||
|
build:
|
||||||
|
context: ./api
|
||||||
|
dockerfile: ./api.Dockerfile
|
||||||
Reference in new issue
Block a user