add hosting
This commit is contained in:
parent
652e8ad917
commit
b57637c05f
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
image: node:alpine
|
||||||
|
volumes:
|
||||||
|
- ./:/home/node/app/
|
||||||
|
working_dir: /home/node/app/
|
||||||
|
command: sh -c 'npm i --also=dev && npm run build'
|
||||||
|
nginx:
|
||||||
|
image: nginx:alpine
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||||
|
- ./public/:/var/www/html/
|
||||||
|
#ports:
|
||||||
|
# - "8084:8080"
|
34
nginx.conf
Normal file
34
nginx.conf
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
worker_processes auto;
|
||||||
|
worker_cpu_affinity auto;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
#daemon off;
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
# rewrite_log on;
|
||||||
|
include mime.types;
|
||||||
|
default_type application/json;
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
sendfile on;
|
||||||
|
# tcp_nopush on;
|
||||||
|
keepalive_timeout 3;
|
||||||
|
# tcp_nodelay on;
|
||||||
|
# gzip on;
|
||||||
|
client_max_body_size 1m;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
index index.html;
|
||||||
|
root /var/www/html;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user