summaryrefslogtreecommitdiff
path: root/config
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/config.go12
-rw-r--r--config/config.local.yaml5
-rw-r--r--config/config.prod.yaml5
-rw-r--r--config/config.stage.yaml25
4 files changed, 18 insertions, 29 deletions
diff --git a/config/config.go b/config/config.go
index 8ab1bfc..0b1570a 100644
--- a/config/config.go
+++ b/config/config.go
@@ -22,7 +22,7 @@ type Config struct {
CanonicalEndpoint string `json:"CanonicalEndpoint" yaml:"canonicalEndpoint" validate:"required"`
Meta MetaConfig `json:"Meta" yaml:"meta"`
PhotoStorage PhotoStorageConfig `json:"PhotoStorage" yaml:"photoStorage"`
- StaticStorage StaticStorageConfig `json:"StaticStorage" yaml:"staticStorage" validate:"required"`
+ StaticStorage PhotoTypeConfig `json:"StaticStorage" yaml:"staticStorage"`
AllowOrigins []string `json:"AllowOrigins" yaml:"allowOrigins"`
}
@@ -261,16 +261,6 @@ type HomePageGifsConfig struct {
Indexes []string `json:"Indexes" yaml:"indexes"`
}
-type StaticStorageConfig struct {
- BaseUrl string `json:"BaseUrl" yaml:"baseUrl" validate:"url,required"`
- Map MapStorageConfig `json:"Map" yaml:"map" validate:"required"`
-}
-
-type MapStorageConfig struct {
- BaseUrl string `json:"BaseUrl" yaml:"baseUrl" validate:"url,required"`
- PMTiles string `json:"PMTiles" yaml:"pmTiles" validate:"required"`
-}
-
func LoadConfig(path string, config *Config) error {
fileBytes, err := os.ReadFile(path)
if err != nil {
diff --git a/config/config.local.yaml b/config/config.local.yaml
index 7fe612b..80eb8f7 100644
--- a/config/config.local.yaml
+++ b/config/config.local.yaml
@@ -74,9 +74,8 @@ photoStorage:
indexes: ["1", "2", "3"]
staticStorage:
baseUrl: https://cdn.saya.uz/static
- map:
- baseUrl: https://cdn.saya.uz/map
- pmTiles: global.pmtiles
+mapStorage:
+ baseUrl: https://cdn.saya.uz/map
allowOrigins:
- https://storage.yandexcloud.kz
- https://cdn.saya.uz
diff --git a/config/config.prod.yaml b/config/config.prod.yaml
index 5df5422..ad4864a 100644
--- a/config/config.prod.yaml
+++ b/config/config.prod.yaml
@@ -77,9 +77,8 @@ photoStorage:
indexes: ["1", "2", "3"]
staticStorage:
baseUrl: https://cdn.saya.uz/static
- map:
- baseUrl: https://cdn.saya.uz/map
- pmTiles: global.pmtiles
+mapStorage:
+ baseUrl: https://cdn.saya.uz/map
allowOrigins:
- https://storage.yandexcloud.kz
- https://cdn.saya.uz
diff --git a/config/config.stage.yaml b/config/config.stage.yaml
index 30feead..4b46c6c 100644
--- a/config/config.stage.yaml
+++ b/config/config.stage.yaml
@@ -31,11 +31,11 @@ localePath: ./locale/
availableLanguages:
- name: ru
alt: Русский
- flag: https://cdn.saya.uz/static/flags/ru.svg
+ flag: https://storage.yandexcloud.kz/sayauz-static/flags/ru.svg
locFile: localization.ru.yaml
- name: en
alt: English
- flag: https://cdn.saya.uz/static/flags/gb.svg
+ flag: https://storage.yandexcloud.kz/sayauz-static/flags/gb.svg
locFile: localization.en.yaml
auth:
db:
@@ -56,26 +56,27 @@ mail:
canonicalEndpoint: "https://${FQDN}"
photoStorage:
full:
- baseUrl: https://photos.saya.uz/jpeg-full/%s
+ baseUrl: https://storage.yandexcloud.kz/sayauz-photos/%s
webp:
- baseUrl: https://photos.saya.uz/webp-full/%s.webp
+ baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp/%s.webp
thumbnail1600p:
- baseUrl: https://photos.saya.uz/webp-1600p/%s.webp
+ baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp1600/%s.webp
thumbnail1200p:
- baseUrl: https://photos.saya.uz/webp-1200p/%s.webp
+ baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp1200/%s.webp
thumbnail800p:
- baseUrl: https://photos.saya.uz/webp-800p/%s.webp
+ baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp800/%s.webp
thumbnail560p:
- baseUrl: https://photos.saya.uz/webp-560p/%s.webp
+ baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp560/%s.webp
thumbnail320p:
- baseUrl: https://photos.saya.uz/webp-320p/%s.webp
+ baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp320/%s.webp
homePageGifs:
baseUrl: https://cdn.saya.uz/static/home-page-gifs/otter-%s.gif
indexes: ["1", "2", "3"]
staticStorage:
baseUrl: https://cdn.saya.uz/static
- map:
- baseUrl: https://cdn.saya.uz/map
- pmTiles: global.pmtiles
+mapStorage:
+ baseUrl: https://cdn.saya.uz/map
allowOrigins:
+ - https://storage.yandexcloud.kz
- https://cdn.saya.uz
+