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