forked from manjurulhoque/django-job-portal
-
Notifications
You must be signed in to change notification settings - Fork 19
/
README.md
209 lines (130 loc) · 15.4 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<p align="center">
<img alt="banner" src="https://github.com/GeeksCAT/nem-per-feina-logos/raw/main/nemperfeina_large_v2_60px.png"/>
</p>
<p align="center">
<img alt="stars" src="https://img.shields.io/github/stars/GeeksCAT/nem-per-feina?style=social"/>
<img alt="forks" src="https://img.shields.io/github/forks/GeeksCAT/nem-per-feina?label=Forks&style=social"/>
<img alt="watchers" src="https://img.shields.io/github/watchers/GeeksCAT/nem-per-feina?style=social"/>
<a href="https://weblate.geekscat.org/projects/nem-per-feina/" target="_blank"><img alt="translation" src="https://weblate.geekscat.org/widgets/nem-per-feina/-/svg-badge.svg"/></a>
<a href="#Contributing"><img alt="translation" src="https://img.shields.io/badge/all_contributors-18-orange.svg?style=flat-square"/></a>
<!-- Update this ^ image with current contributors count //due to centering issues -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>
<h1>Nem per feina</h1>
**Nem per feina** is an open source project promoted by [GeeksCat](https://geekscat.org/) association for [Hactoberfest 2020](https://hacktoberfest.geekscat.org/) event.
Show your support by 🌟 the project!!
- [The project](#the-project)
- [Contributing](#contributing)
- [Tech stack](#tech-stack)
- [Setup backend development environment](#setup-backend-development-environment)
- [Docker](#docker)
- [Local venv](#local-venv)
- [Contributors](#contributors)
<a name="the-project"></a>
## The project
The objective of this _hackathon_ is to launch a **job portal website** where tech community can find _curated_ job opportunities from local companies.
We forked the open source project [django-job-portal](https://github.com/manjurulhoque/django-job-portal) (See [demo 1](https://django-portal.herokuapp.com/), [demo 2](http://jobs.manjurulhoque.com/)) and use it as a baseline.
<a name="deployment"></a>
## Deployment
### Kubernetes deployment
To deploy to a k8s cluster see the [k8s manifests](/manifests/README.md)
<a name="contributing"></a>
## Contributing
**Nem per feina** is a collaborative effort where everybody is more than welcome to contribute, no experience is required!
Have a look at [CONTRIBUTING.md](CONTRIBUTING.md) file that describes the process to submit a contribution, and come say hi 👋👋 to [GeeksCat slack](https://geekscat.slack.com) where most contributors hang out.
<a name="tech-stack"></a>
## Tech stack
- **[Backend:](https://github.com/GeeksCAT/nem-per-feina)** A [django](https://www.djangoproject.com/) web application on top of a [PostgreSQL](https://www.postgresql.org/) database. It contains all business logic, data model (ORM) and a [django-rest-framework](https://www.django-rest-framework.org/) REST API to power the frontend/UI
- **Frontend:** A **[frontoffice](https://github.com/GeeksCAT/nem-per-feina-frontoffice)** using [vue.js](https://vuejs.org/)/[SASS](https://sass-lang.com/) using [BEMIT Architecture](https://csswizardry.com/2015/08/bemit-taking-the-bem-naming-convention-a-step-further/) and [Nuxt](https://nuxtjs.org/), and a **[backoffice](https://github.com/GeeksCAT/nem-per-feina-backoffice)** using [React](https://reactjs.org/)/[styled-components](https://styled-components.com/) and [Next](https://nextjs.org/)
- **Arch-ci:** Dockerized dev environment, CI/CD workflow and Kubernettes cluster for production and more!
<a name="setup-backend-development-environment"></a>
## Setup backend development environment
<a name="docker"></a>
### Dockerized environment
If you wish to use a dockerized development environment, you can easily do so by following these steps:
1. Add `.env` file:
`cp .env.dev.sample .env`
2. Start local development environment:
`make start`
Or, if you wish to run in detached mode:
`make serve`
3. Execute tests:
`make test`
4. To see all available options:
`make help`
#### Development with docker dev environment
Once the environment is up and running, you can modify the project files and the
Django auto-reload will pick up your changes in the container.
To stop the dockerized development environment use:
`CTRL+C` or `make stop` if you run in detached mode.
#### Executing database migrations
The app container runs database migrations at every startup, so simply restart the app server with
`make restart c=app`
#### Changing requirements file
If during development you need to change the `requirements.txt` file you'll also have to rebuild the container:
1. Build images again with `make build`or `make build c=app`// or `c=test`
2. Stop and remove your environment with `make restart`. Even though continers are removed, your database volume will be preserved.
#### Recreate database
If you want to recreate the database:
1. Delete everything including volumes with `make purge`
2. Restart everything with `make up` (or `make server` for detached mode)
<a name="local-venv"></a>
### Local environment
#### Install
1. Create a virtual environment
`virtualenv venv`
Or
`python3.8 -m venv venv`
2. Activate it
`source venv/bin/activate`
3. Install the packages in the virtual env:
`pip install -r requirements.txt`
4. Add `.env` file.
`cp .env.dev.sample .env`
#### Run
1.With the venv activate it, execute:
`python manage.py collectstatic`
_Note_ : Collect static is not necessary when debug is True (in dev mode)
2. Create initial database:
`python manage.py migrate`
3. Load demo data (optional):
`python manage.py loaddata demo`
4. Run server:
`python manage.py runserver 0.0.0.0:8000`
<a name="contributors"></a>
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://xaviertorello.cat/"><img src="https://avatars3.githubusercontent.com/u/8709244?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Xavi Torelló</b></sub></a><br /><a href="#question-XaviTorello" title="Answering Questions">💬</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=XaviTorello" title="Code">💻</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=XaviTorello" title="Documentation">📖</a> <a href="#eventOrganizing-XaviTorello" title="Event Organizing">📋</a> <a href="#ideas-XaviTorello" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-XaviTorello" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#mentoring-XaviTorello" title="Mentoring">🧑🏫</a> <a href="#projectManagement-XaviTorello" title="Project Management">📆</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3AXaviTorello" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/jbagot"><img src="https://avatars1.githubusercontent.com/u/11691527?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Jordi Bagot Soler</b></sub></a><br /><a href="#question-jbagot" title="Answering Questions">💬</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=jbagot" title="Code">💻</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=jbagot" title="Documentation">📖</a> <a href="#eventOrganizing-jbagot" title="Event Organizing">📋</a> <a href="#ideas-jbagot" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-jbagot" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#mentoring-jbagot" title="Mentoring">🧑🏫</a> <a href="#projectManagement-jbagot" title="Project Management">📆</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Ajbagot" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/francescarpi"><img src="https://avatars0.githubusercontent.com/u/287872?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Francesc Arpí Roca</b></sub></a><br /><a href="#question-francescarpi" title="Answering Questions">💬</a> <a href="https://github.com/GeeksCat/nem-per-feina/issues?q=author%3Afrancescarpi" title="Bug reports">🐛</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=francescarpi" title="Code">💻</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=francescarpi" title="Documentation">📖</a> <a href="#eventOrganizing-francescarpi" title="Event Organizing">📋</a> <a href="#ideas-francescarpi" title="Ideas, Planning, & Feedback">🤔</a> <a href="#mentoring-francescarpi" title="Mentoring">🧑🏫</a> <a href="#projectManagement-francescarpi" title="Project Management">📆</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Afrancescarpi" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/d-asensio"><img src="https://avatars2.githubusercontent.com/u/13970905?v=4?s=80" width="80px;" alt=""/><br /><sub><b>David Asensio Cañas</b></sub></a><br /><a href="#question-d-asensio" title="Answering Questions">💬</a> <a href="https://github.com/GeeksCat/nem-per-feina/issues?q=author%3Ad-asensio" title="Bug reports">🐛</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=d-asensio" title="Code">💻</a> <a href="#design-d-asensio" title="Design">🎨</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=d-asensio" title="Documentation">📖</a> <a href="#eventOrganizing-d-asensio" title="Event Organizing">📋</a> <a href="#ideas-d-asensio" title="Ideas, Planning, & Feedback">🤔</a> <a href="#mentoring-d-asensio" title="Mentoring">🧑🏫</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Ad-asensio" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://www.victormartingarcia.com/"><img src="https://avatars1.githubusercontent.com/u/659832?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Victor</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=victormartingarcia" title="Code">💻</a> <a href="https://github.com/GeeksCat/nem-per-feina/commits?author=victormartingarcia" title="Documentation">📖</a> <a href="#eventOrganizing-victormartingarcia" title="Event Organizing">📋</a> <a href="#ideas-victormartingarcia" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Avictormartingarcia" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/fullonic"><img src="https://avatars3.githubusercontent.com/u/13336073?v=4?s=80" width="80px;" alt=""/><br /><sub><b>dbf</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=fullonic" title="Code">💻</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Afullonic" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/ytturi"><img src="https://avatars2.githubusercontent.com/u/8191681?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Ytturi</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=ytturi" title="Code">💻</a> <a href="#ideas-ytturi" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-ytturi" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Aytturi" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/dguillen12"><img src="https://avatars0.githubusercontent.com/u/71018943?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Didac Guillen</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=dguillen12" title="Code">💻</a> <a href="#infra-dguillen12" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/xdiume"><img src="https://avatars1.githubusercontent.com/u/72464185?v=4?s=80" width="80px;" alt=""/><br /><sub><b>xdiume</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=xdiume" title="Code">💻</a></td>
<td align="center"><a href="https://avatars.githubusercontent.com/u/6842807"><img src="https://avatars2.githubusercontent.com/u/6842807?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Xavier Marquès</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=wolframtheta" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/castellinmanuel/"><img src="https://avatars2.githubusercontent.com/u/2655072?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Manuel Castellin</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=mcastellin" title="Code">💻</a> <a href="#infra-mcastellin" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/GeeksCat/nem-per-feina/pulls?q=is%3Apr+reviewed-by%3Amcastellin" title="Reviewed Pull Requests">👀</a></td>
<td align="center"><a href="https://github.com/oriolpiera"><img src="https://avatars2.githubusercontent.com/u/26488435?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Oriol Piera</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=oriolpiera" title="Code">💻</a></td>
<td align="center"><a href="http://www.tecob.com/"><img src="https://avatars3.githubusercontent.com/u/2232647?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Franc Rodriguez</b></sub></a><br /><a href="#infra-francrodriguez" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://stackoverflow.com/users/842935/danihp?tab=profile"><img src="https://avatars2.githubusercontent.com/u/3105983?v=4?s=80" width="80px;" alt=""/><br /><sub><b>dani herrera</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=ctrl-alt-d" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mcmontseny"><img src="https://avatars0.githubusercontent.com/u/72517550?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Marc Casamitjana Montseny</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=mcmontseny" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/lluisd"><img src="https://avatars3.githubusercontent.com/u/7629843?v=4?s=80" width="80px;" alt=""/><br /><sub><b>lluisd</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=lluisd" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/eudago"><img src="https://avatars2.githubusercontent.com/u/809916?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Eudald Dachs</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=eudago" title="Code">💻</a></td>
<td align="center"><a href="https://www.linkedin.com/in/ericmassip/"><img src="https://avatars3.githubusercontent.com/u/22151914?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Eric Massip</b></sub></a><br /><a href="https://github.com/GeeksCat/nem-per-feina/commits?author=ericmassip" title="Code">💻</a> <a href="#infra-ericmassip" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!