From 9bedcd31855b351750ce4ab3600e0c8eca94eb12 Mon Sep 17 00:00:00 2001 From: vas3k Date: Wed, 12 May 2021 10:12:48 +0300 Subject: [PATCH] Update .env.example --- README.md | 2 +- club/.env.example | 42 ++++++++++++++++++++++++++---------------- docs/setup.md | 26 +++++++++++++------------- 3 files changed, 40 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index bbd7c3a6..010848f3 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The first time you start it up, you'll probably need a test account to get right Auto-reloading for backend and frontend is performed automatically on every code change. If everything is broken and not working (it happens), you can always rebuild the world from scratch using `docker-compose up --build`. -## 🧑‍💻 Advanced setup for pro +## 🧑‍💻 Advanced setup for devs For more information on how to test the telegram bot, run project without docker and other useful notes, read [docs/setup.md](docs/setup.md). diff --git a/club/.env.example b/club/.env.example index 7d72b309..b3125ce2 100644 --- a/club/.env.example +++ b/club/.env.example @@ -1,19 +1,29 @@ -# Patreon settings: +SECRET_KEY="salt_for_cookies" + +MEDIA_UPLOAD_URL="https://i.vas3k.club/upload/" +MEDIA_UPLOAD_CODE="the_secret_passphrase" + +EMAIL_HOST_USER="smtp_server_username" +EMAIL_HOST_PASSWORD="smtp_server_password" + +TELEGRAM_TOKEN="token_for_telegram_bot" +TELEGRAM_BOT_URL="https://t.me/00000000000" +TELEGRAM_ADMIN_CHAT_ID="-1000000000000" +TELEGRAM_CLUB_CHANNEL_URL="https://t.me/vas3k_club" +TELEGRAM_CLUB_CHANNEL_ID="-10000000000" +TELEGRAM_CLUB_CHAT_URL="https://t.me/joinchat/00000000000" +TELEGRAM_CLUB_CHAT_ID="-1000000000000" +TELEGRAM_ONLINE_CHANNEL_URL="https://t.me/joinchat/0000000000" +TELEGRAM_ONLINE_CHANNEL_ID="-10000000000" + +SENTRY_DSN="" + +STRIPE_API_KEY="" +STRIPE_PUBLIC_KEY="" +STRIPE_WEBHOOK_SECRET="" + PATREON_CLIENT_ID="" PATREON_CLIENT_SECRET="" -# Telegram bot settings: -TELEGRAM_TOKEN="" -TELEGRAM_BOT_URL="" -TELEGRAM_ADMIN_CHAT_ID="" -TELEGRAM_CLUB_CHANNEL_URL="" -TELEGRAM_CLUB_CHANNEL_ID="" -TELEGRAM_CLUB_CHAT_URL="" -TELEGRAM_CLUB_CHAT_ID="" -TELEGRAM_ONLINE_CHANNEL_URL="" -TELEGRAM_ONLINE_CHANNEL_ID="" - -# Others: -SECRET_KEY="" #TODO @vas3k, what is that key for? -> to encode cookies and csrf tokens -JWT_SECRET="" -MEDIA_UPLOAD_CODE="" +JWT_PRIVATE_KEY="" +WEBHOOK_SECRETS="" diff --git a/docs/setup.md b/docs/setup.md index 86b61111..3d396f52 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -1,18 +1,5 @@ # Advanced Setup -## Telegram bot - -To run telegram bot you have to: - 1. Copy env.exmaple file: `cp ./club/.env.example ./club/.env` - 2. Fill all the requirement fields in `./club/env`, such as `TELEGRAM_TOKEN` etc. - - `TELEGRAM_TOKEN` you can get from [@BotFather](https://t.me/BotFather) - - To get `TELEGRAM_CLUB_CHANNEL_URL`, `TELEGRAM_ADMIN_CHAT_ID` etc Just Simply Forward a message from your group/channel to [@JsonDumpBot](https://t.me/JsonDumpBot) or [@getidsbot](https://t.me/getidsbot) - 3. Rebuild application: `docker-compose up --build` - -## Docker-compose - -Check out our [docker-compose.yml](https://github.com/vas3k/vas3k.club/blob/master/docker-compose.yml) to understand the infrastructure. - ## Local development Once you decided to code something in the project you'll need to setup your environment. Here's how you can make it. @@ -87,3 +74,16 @@ $ pipenv run python manage.py migrate # run dev server $ pipenv run python manage.py runserver 0.0.0.0:8000 ``` + +## Telegram bot + +To run telegram bot you have to: + 1. Copy env.exmaple file: `cp ./club/.env.example ./club/.env` + 2. Fill all the requirement fields in `./club/env`, such as `TELEGRAM_TOKEN` etc. + - `TELEGRAM_TOKEN` you can get from [@BotFather](https://t.me/BotFather) + - To get `TELEGRAM_CLUB_CHANNEL_URL`, `TELEGRAM_ADMIN_CHAT_ID` etc Just Simply Forward a message from your group/channel to [@JsonDumpBot](https://t.me/JsonDumpBot) or [@getidsbot](https://t.me/getidsbot) + 3. Rebuild application: `docker-compose up --build` + +## Docker-compose + +Check out our [docker-compose.yml](https://github.com/vas3k/vas3k.club/blob/master/docker-compose.yml) to understand the infrastructure.