You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
gman 36bd0c2790
absolute path martin
6 months ago
deploy Feature/cicd 3 years ago
dist absolute path martin 6 months ago
nginx update nginx config 3 years ago
public favicon 2 years ago
src absolute path martin 6 months ago
.dockerignore Add .env to dockerignore 3 years ago
.env remove auth 6 months ago
.env.local.example Get api url from env 3 years ago
.gitignore Update build 3 years ago
.gitlab-ci.yml edited gitlab_ci 2 years ago
Dockerfile msc: use public docker registry 6 months ago
Dockerfile-mergefront add: merge frontend with backend static 6 months ago
README.md fix url, build 6 months ago
docker-compose.yml msc: adjust docker-compose deployment 6 months ago
index.html END-712 - import report styling 2 years ago
package-lock.json remove auth 6 months ago
package.json final kk 2 years ago
postcss.config.cjs Add Sidebar with main components 3 years ago
tailwind.config.cjs Add minor markup changes 3 years ago
tsconfig.json Refactor stores; assemble filters store 3 years ago
tsconfig.node.json Refactor stores; assemble filters store 3 years ago
vite-env.d.ts Refactor stores; assemble filters store 3 years ago
vite.config.ts fix url, build 6 months ago
yarn.lock remove auth 6 months ago

README.md

Рекомендательный сервис для размещения постаматов

Инструкция по развёртыванию frontend части проекта:

  • Установите docker

  • Установите docker compose

  • Положите файлы из репозитория в папку postamates_frontend:

    • через GIT:
    git clone git@gitlab.com:leaders2022/postamates_frontend.git postamates
    git pull
    git checkout sst_main
    git pull
    
    • через zip архив: unzip archieve.zip -d postamates_frontend
  • создайте файл postamates_frontend/.env на основе файла postamates_frontend/.env.like

  • Запустите проект:

    cd postamates
    sudo docker-compose up -d
    

    после этого статика проекта будет находиться в директории postamates_frontend/dist

Инструкция по devops части проекта:

  • Установите backend

  • Установите frontend

  • Настройте nginx в зависимости от конфигураций .env файлов в backend и frontend репозиториях

  • Пример конфигурации:

	server_name postnet-dev.selftech.ru;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/postnet-dev.selftech.ru/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/postnet-dev.selftech.ru/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

	root /home/postamates_frontend/dist;

	index index.html;
    client_max_body_size 400m;
    location / {
        try_files $uri /index.html;
    }


    location https://postamates.spatialsystems.ru/api/ {
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://0.0.0.0:DJANGO_PORThttps://postamates.spatialsystems.ru/api/;
	}
    location /admin/ {
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://0.0.0.0:DJANGO_PORT/admin/;
	}
    location /accounts/ {
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://0.0.0.0:DJANGO_PORT/accounts/;
	}
    location /media  {
        alias /home/postamates/media;
    }

    location /django_static {
        alias /home/postamates/django_static;
    }

    location /martin {
    	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://0.0.0.0:MARTIN_PORT/;
    }

    error_page  500 502 503 504 /50x.html;

    location = /50x.html {
        root  /usr/share/nginx/html;
    }
}
server {
    server_name postnet-dev.selftech.ru;
    if ($host = postnet-dev.selftech.ru) {
        return 301 https://$host$request_uri;
    }
	listen 80 ;
	listen [::]:80 ;
    return 404;
}