modified: main_dc/docker-compose.yml
modified: main_dc/nginx/nginx-ssl.conf modified: main_dc/yalarba/api_es/cmd/main.go fix some names for path into api_es
This commit is contained in:
@@ -177,11 +177,11 @@ services:
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
api_easysite:
|
||||
api_es:
|
||||
build:
|
||||
context: ./api_easysite
|
||||
context: ./yalarba/api_es
|
||||
dockerfile: Dockerfile
|
||||
container_name: api_easysite
|
||||
container_name: api_es
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
|
||||
@@ -103,7 +103,7 @@ server {
|
||||
|
||||
# Новый блок для API
|
||||
location /api/ {
|
||||
proxy_pass http://api_easysite:8081/api/;
|
||||
proxy_pass http://api_es:8081/api/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
@@ -17,12 +17,16 @@ import (
|
||||
|
||||
// Модели для БД
|
||||
type User struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
ID uint `json:"id" gorm:"primarykey"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
|
||||
|
||||
Name string `json:"name" gorm:"size:100;not null"`
|
||||
Email string `json:"email" gorm:"size:255;uniqueIndex;not null"`
|
||||
Password string `json:"-" gorm:"size:255;not null"` // Пароль не возвращаем в JSON
|
||||
// OAuth провайдеры
|
||||
OAuthProviders []OAuthProvider `json:"-"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
|
||||
Reference in New Issue
Block a user