Есть связка NGINX, DOCKER, NUXT;
Вот docker-compose:
version: "3.5"
services:
nginx_vk:
image: nginx
container_name: nginx_vk
volumes:
- dist:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- client_vk
networks:
vk:
ipv4_address: "172.41.0.1"
client_vk:
build: client/
tty: true
container_name: client_vk
volumes:
- /etc/letsencrypt:/etc/letsencrypt
- dist:/client/dist
networks:
vk:
ipv4_address: "172.41.0.3"
volumes:
dist:
networks:
vk:
driver: bridge
ipam:
driver: default
config:
- subnet: "172.41.0.0/24"
gateway: "172.41.0.254"
driver_opts:
com.docker.network.bridge.name: vk
Вот Dockefile у NUXT:
FROM node:16.14.2-alpine as build-stage
ENV npm_config_user=root
WORKDIR /client
COPY package*.json ./
RUN npm set unsafe-perm true
RUN npm install
COPY . .
ARG CACHEBUST=1
RUN npm run generate
Вот nginx.conf:
server {
listen 443 ssl;
listen [::]:443 ssl http2;
proxy_connect_timeout 15;
proxy_send_timeout 15;
proxy_read_timeout 15;
send_timeout 15;
error_page 500 501 502 503 504 /error/5xx.html;
error_page 405 =200 $uri;
location ^~ /error/ {
internal;
root /root/work/sites/vk/;
}
server_name vk.kirti.agency;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_pass http://172.41.0.1/;
}
location /scripts/ {
root /root/work/sites/vk/client/static/;
}
location /fonts/ {
root /root/work/sites/vk/client/static/;
}
location ~ \.(|gif|png|jpeg|svg|mp3)$ {
root /root/work/sites/vk/client/static/uploads; #dont edit
}
#ssl on;
ssl_certificate /etc/letsencrypt/live/vk.kirti.agency/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/vk.kirti.agency/privkey.pem; # managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/vk.kirti.agency/chain.pem;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ecdh_curve secp384r1:prime256v1:X25519;
ssl_session_timeout 24h;
ssl_session_cache shared:TLS:5m;
resolver 1.1.1.1 8.8.8.8 77.88.8.8;
resolver_timeout 2s;
ssl_stapling on;
ssl_stapling_verify on;
}
Проблема в том, что вот у меня есть store:
import axios from "axios";
export const state = () => ({
load: false,
});
export const getters = {
getLoad(state) {
return state.load;
},
};
export const mutations = {
setLoad(state) {
state.load = true;
},
};
Но как только я добавлю в store в state кроме load еще перемнные или еще что-то, то сразу все ломается, на nuxt пишет forbidden 403 почему то, не понимаю как nuxt с store связан с nginx и при чем тут 403 error, а тем более почему все ломается после добавления еще переменных в store...