From 3df4f7facb9b0a2a1f770ebece0af6280762df00 Mon Sep 17 00:00:00 2001 From: Michael Makarochkin Date: Fri, 14 Mar 2025 03:16:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B8=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .example.env | 1 + .gitignore | 3 ++- README.md | 19 +++++++++++++------ docker-compose.yml | 2 +- environment/example.config.yml | 6 +++--- 5 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 .example.env diff --git a/.example.env b/.example.env new file mode 100644 index 0000000..775f70b --- /dev/null +++ b/.example.env @@ -0,0 +1 @@ +DB_PASSWORD=password \ No newline at end of file diff --git a/.gitignore b/.gitignore index 723ef36..3bf780b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +.env \ No newline at end of file diff --git a/README.md b/README.md index 9424a23..104a154 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,18 @@ -Библиотеки +# pink_fox -- [веб framework](https://github.com/gin-gonic/gin) -- [косольное приложение](https://github.com/spf13/cobra) +## Развертывание + +Скопировать `cp environment/example.config.yml environment/config.yml` и поправить пароль. + +Скопировать `cp .example.env .env` и поправить пароль. + +## Библиотеки + +- [Веб framework](https://github.com/gin-gonic/gin) +- [Framework консольных приложений](https://github.com/spf13/cobra) - [Шаблонизатор](https://github.com/CloudyKit/jet) - -Планы +## Планы - модели - кастомизация страницы html ошибок @@ -21,4 +28,4 @@ - транзакции - timeout для базы данных - запуск задач по cron -- заполнение базы данных тестовыми значениями консольной командой \ No newline at end of file +- заполнение базы данных тестовыми значениями консольной командой diff --git a/docker-compose.yml b/docker-compose.yml index 8fcc2ea..64386f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: image: postgres:16 environment: - POSTGRES_USER=pink_fox - - POSTGRES_PASSWORD=pink_fox_pass + - POSTGRES_PASSWORD=${DB_PASSWORD} - TZ=Europe/Moscow - PGTZ=Europe/Moscow volumes: diff --git a/environment/example.config.yml b/environment/example.config.yml index 0ecf176..c15a689 100644 --- a/environment/example.config.yml +++ b/environment/example.config.yml @@ -3,11 +3,11 @@ port: 12001 # Соединение с postgres db: - host: localhost - user: user + host: postgres + user: pink_fox password: password port: 5432 - database: dbname + database: pink_fox_db debug: true