Improve README and compose for newbies

This commit is contained in:
vas3k 2021-05-11 13:32:56 +03:00
parent bc7150f2f6
commit 9cbb1f0ed8
2 changed files with 67 additions and 53 deletions

View File

@ -4,7 +4,7 @@
<h1>vas3k.club</h1>
</div>
Welcome to the [vas3k.club](https://vas3k.club) codebase. Here we are building our small lifestyle IT community. If you want to help us with that, welcome.
Welcome to the [vas3k.club](https://vas3k.club) codebase. We're building our own little IT-lifestyle community. We've opensourced the code so that every member could contribute or implement a feature that they want.
[vas3k.club](https://vas3k.club) is a platform with private and paid memberships that has emerged around the [vas3k.ru](https://vas3k.ru) blog and satellite chat rooms. It's not a typical IT community with tutorials and framework reviews, but rather more of a lifestyle one. We are trying to build a peaceful and useful ecosystem, which the Internet has lost a long ago. Therefore, we carefully select and filter new members and do not seek wild growth.
@ -18,7 +18,11 @@ We're a bullshitless community!
We try to keep our stack as simple and stupid as possible. Because we're not very smart either.
> This section is in progress...
The trickiest part of our stack is how we develop the frontend and backend as a single service. We don't use SPA, as many people do, but only make parts of the page dynamic by inserting Vue.js components directly into Django templates. This may seem weird, but it actually makes it very easy for one person to develop and maintain the entire site.
You don't really need to understand how the magic of webpack <-> django communication works under the hood to develop new components. Just run `django runserver` and `npm run watch` at the same time and enjoy your coding.
Feel free to propose "state of the art" refactorings for UI or backend code if you know how to do it better. We're open for best practices from both worlds.
## 🔮 Installing and running locally
@ -37,13 +41,13 @@ We try to keep our stack as simple and stupid as possible. Because we're not ver
$ docker-compose up
```
It will start the development server with all the necessary services. Wait till it starts and go to [http://127.0.0.1:8000/](http://127.0.0.1:8000/). Voila.
This will start the application in development mode on [http://127.0.0.1:8000/](http://127.0.0.1:8000/), as well as other necessary services: postgres database, queue with workers, redis and webpack.
At the very beginning, you probably need a dev account to log in. Open [/godmode/dev_login/](http://127.0.0.1:8000/godmode/dev_login/) in your browser and it will make one for you (and log you in automatically). To create new test user hit the [/godmode/random_login/](http://127.0.0.1:8000/godmode/random_login/) endpoint.
The first time you start it up, you'll probably need a test account to get right in. Go to [/godmode/dev_login/](http://127.0.0.1:8000/godmode/dev_login/) and it will create an admin account for you (and log you in automatically). To create new test user hit the [/godmode/random_login/](http://127.0.0.1:8000/godmode/random_login/) endpoint.
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 developers
## 🧑‍💻 Advanced setup for pro
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).
@ -57,13 +61,27 @@ See [docs/test.md](docs/test.md) for more insights.
## 🚢 Deployment
Automatic CI/CD pipelines are building and testing the app on each PR. They also deploy changes to production on merge to master (only a maintainer can do it).
No k8s, no AWS, we ship dockers directly via ssh and it's beautiful!
These pipelines are made as github-actions. Explore the [.github](.github) folder for more.
Our CI/CD pipelines have to take all the dirty work. They build, test and deploy changes to production on every merge to master (only official maintainers can do it).
:point_up: We still need someone to improve and optimize our CI workflows. They work but they're really poor :D
These pipelines are implemented as Github Actions. Explore the [.github](.github) folder for more insights.
We're open for proposals on how to improve our deployments without overcomplicating it with modern devops bullshit.
## 🙋‍♂️ How to report a bug or propose a feature?
- 🆕Open [a new issue](https://github.com/vas3k/vas3k.club/issues/new).
- 🔦 Please, **use a search**, to check, if there is already exied issue!
- Explain your idea or proposal in all the details:
- If it's a **new feature**:
- 🖼 If it's **UI/UX** related: attach a screenshot or wireframe.
- Please mark this issues with prefix **"Фича:"**
- 🐞 If it's a **bug**:
- make sure you clearly describe "observed" and "expected" behaviour. It will dramatically save time for our contributors and maintainers.
- **For minor fixes** please just open a PR.
- *Please mark this issues with prefix **"Баг:"***
## 😍 Contributions
Contributions are welcome.
@ -76,52 +94,47 @@ We also run the public [Github Project Board](https://github.com/vas3k/vas3k.clu
> The official development language at the moment is Russian, because 100% of our users speak it. We don't want to introduce unnecessary barriers for them. But we are used to writing commits and comments in English and we won't mind communicating with you in it.
### 🙋‍♂️ How to report a bug or propose a feature?
- 🆕Open [a new issue](https://github.com/vas3k/vas3k.club/issues/new).
- 🔦 Please, **use a search**, to check, if there is already exied issue!
- Explain your idea or proposal in all the details:
- If it's a **new feature**:
- 🖼 If it's **UI/UX** related: attach a screenshot or wireframe.
- Please mark this issues with prefix **"Фича:"**
- 🐞 If it's a **bug**:
- make sure you clearly describe "observed" and "expected" behaviour. It will dramatically save time for our contributors and maintainers.
- **For minor fixes** please just open a PR.
- *Please mark this issues with prefix **"Баг:"***
### 😎 I want to write some code!
### 😎 I want to write some code
- Open our [Issues page](https://github.com/vas3k/vas3k.club/issues) to see the most important tickets at top.
- Pick one issue you like and **leave a comment** inside that you're getting it.
**For big changes** open an issues first or (if it's already opened) leave a comment with brief explanation what and why you're going to change. Many tickets hang open not because they cannot be done, but because they cause many logical contradictions that you may not know. It's better to clarify them in comments before sending a PR.
### 🚦Pay attention to issue labels classification
### 🚦Pay attention to issue labels!
##### 🟩 Ready to implement
#### 🟩 Ready to implement
- **good first issue** — good tickets **for first-timers**. Usually these are simple and not critical things that allow you to quickly feel the code and start contributing to it.
- **bug**the **first priority**, obviously.
- **bug** — if **something is not working**, it needs to be fixed, obviously.
- **critical** — the **first priority** tickets.
- **improvement** — accepted improvements for an existing module. Like adding a sort parameter to the feed. If improvement requires UI, **be sure to provide a sketch before you start.**
##### 🟨 Discussion is needed
- **new feature** — completely new features. Usually they're too hard for newbies, leave them **for experienced contributors.**
#### 🟨 Discussion is needed
- **new feature** — completely new features. Usually they're too hard for newbies, leave them **for experienced contributors.**
- **idea****discussion is needed**. Those tickets look adequate, but waiting for real proposals how they will be done. Don't implement them right away.
##### 🟥 Questionable
#### 🟥 Questionable
- [¯\\_(ツ)\_/¯](https://github.com/vas3k/vas3k.club/labels/%C2%AF%5C_%28%E3%83%84%29_%2F%C2%AF) - special label for **questionable issues**. (should be closed in 60 days of inactivity)
- **[no label]** — ticket is new, unclear or still not reviewed. Feel free to comment it but **wait for our maintainers' decision** before starting to implement it.
## 🔐 Security and vulnerabilities
If you think you've found a critical vulnerability that should not be exposed to the public yet, you can always email me directly on Telegram [@vas3k](https://t.me/vas3k) or by email: [me@vas3k.ru](mailto:me@vas3k.ru).
Please do not test vulnerabilities in public. If you start spamming the website with "test-test-test" posts or comments, our moderators will ban you even if you had good intentions.
- **[no label]** — ticket is new or controversial. Feel free to discuss it but **wait for our maintainers' decision** before starting to implement it.
## 👍 Our top contributors
Take some time to press F and give some respects to our [best contributors](https://github.com/vas3k/vas3k.club/graphs/contributors), who spent their own time to make the club better.
- [@vas3k](https://github.com/vas3k)
- [@dimabory](https://github.com/dimabory)
- [@devcooch](https://github.com/devcooch)
- [@nlopin](https://github.com/nlopin)
- [@fr33mang](https://github.com/fr33mang)
- [@Vostenzuk](https://github.com/Vostenzuk)

View File

@ -50,28 +50,29 @@ services:
- postgres
- redis
bot:
build:
dockerfile: Dockerfile
context: .
command: make docker-run-bot
environment:
- MODE=dev
- DEBUG=true
- PYTHONUNBUFFERED=1
- POSTGRES_DB=vas3k_club
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=postgres
- REDIS_DB=0
- REDIS_HOST=redis
restart: always
volumes:
- .:/app:delegated
depends_on:
- club_app
- postgres
- redis
# Uncomment these lines if you want to test the bot locally
# bot:
# build:
# dockerfile: Dockerfile
# context: .
# command: make docker-run-bot
# environment:
# - MODE=dev
# - DEBUG=true
# - PYTHONUNBUFFERED=1
# - POSTGRES_DB=vas3k_club
# - POSTGRES_USER=postgres
# - POSTGRES_PASSWORD=postgres
# - POSTGRES_HOST=postgres
# - REDIS_DB=0
# - REDIS_HOST=redis
# restart: always
# volumes:
# - .:/app:delegated
# depends_on:
# - club_app
# - postgres
# - redis
postgres:
image: postgres:11