initial commit
This commit is contained in:
commit
778926b879
37
.gitignore
vendored
Normal file
37
.gitignore
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
.idea
|
||||
21
configs/nginx.conf.dev
Normal file
21
configs/nginx.conf.dev
Normal file
@ -0,0 +1,21 @@
|
||||
server {
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_pass http://arkids-main-frontend-development:3000;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://arkids-main-backend-development:5000;
|
||||
}
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
}
|
||||
21
configs/nginx.conf.prod
Normal file
21
configs/nginx.conf.prod
Normal file
@ -0,0 +1,21 @@
|
||||
server {
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_pass http://arkids-main-frontend-production:3000;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
location /api {
|
||||
proxy_pass http://arkids-main-backend-production:5000;
|
||||
}
|
||||
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
}
|
||||
12
package.json
Normal file
12
package.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "arkids-nginx",
|
||||
"version": "1.0.0",
|
||||
"description": "Global nginx for arkids applications",
|
||||
"main": "index.js",
|
||||
"author": "Sergey Krylov <s.krylov@aqsi.ru>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start:dev": "docker run -p 80:80 --rm -v ./configs/nginx.conf.dev:/etc/nginx/conf.d/default.conf --network arkids-network --name arkids-nginx-development nginx:stable-alpine",
|
||||
"start:prod": "docker run -p 80:80 --rm -d -v ./configs/nginx.conf.prod:/etc/nginx/conf.d/default.conf --network arkids-network --name arkids-nginx-production nginx:stable-alpine"
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user