Skip to content

Commit 8a1f468

Browse files
committed
Запуск в продакшн с помощью Docker
1 parent 4146a60 commit 8a1f468

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

docker/docker-production.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@ services:
6262
depends_on:
6363
- nginx
6464
network_mode: 'service:nginx'
65+
restart: unless-stopped
6566
working_dir: /vesp/frontend
66-
command: sh -c 'yarn && yarn generate'
67+
command: sh -c 'yarn && yarn generate:admin && yarn build:site && yarn start:site'

docker/nginx/default.conf.template

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ server {
3030
}
3131

3232
location / {
33-
root /vesp/frontend/dist/site/;
34-
access_log off;
35-
log_not_found off;
36-
expires 1y;
37-
try_files $uri /200.html;
33+
proxy_http_version 1.1;
34+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
35+
proxy_set_header X-Real-IP $remote_addr;
36+
proxy_set_header Host $http_host;
37+
proxy_set_header Upgrade $http_upgrade;
38+
proxy_set_header Connection "upgrade";
39+
proxy_redirect off;
40+
proxy_read_timeout 240s;
41+
proxy_pass http://127.0.0.1:4100;
3842
}
3943

4044
location ~ \.php$ {

0 commit comments

Comments
 (0)