Skip to content

Commit

Permalink
public release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moeenz committed Feb 19, 2016
0 parents commit 1b13153
Show file tree
Hide file tree
Showing 172 changed files with 6,321 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
bower_components


__pycache__


libs/*
!libs/README.md
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Djacket project initiated in Dec, 2015. Below is the list of contributers.

Moeen Zamani <moeenzdev@gmail.com>
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 0.1.0 (February 19, 2016)
* Djacket is publicly released with these features:
- User creation/deletion/settings
- Repo creation/deletion/settings
- Repo browsing/branches/commits/graphs
- See other users public repos
114 changes: 114 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Installation / Troubleshooting

Here the whole process of Djacket installation is explained so in case you feel to do a manual
installation or want to solve problems occurred along the way, the path would be clear.
Process is as explained below in following sub-sections.


## Requirements
Djacket requires
```
- Git (version 1.8 or above)
- Python3 and pip3 (any version of Python version 3.x)
- Pillow imaging library (https://pypi.python.org/pypi/Pillow)
```
to be installed and working.

Other libraries will be exported during installation and start.
These requirements will be checked at the beginning of installation.


## Deposit
There should be an absolute path for a folder to keep Git repositories on server. Path for this folder
is set to variable GIT_DEPOSIT_ROOT in 'core/backend/djacket/settings.py' for Django runtime like this:

```
GIT_DEPOSIT_ROOT = '/path/to/your/deposit/folder'
```

This path will be set during running of installation script.

Each user will have a folder inside GIT_DEPOSIT_ROOT with his/her username
as the folder name and inside this folder is owner's repositories.

So for example if user's username is "thomas", his repositories will be kept under
```
GIT_DEPOSIT_ROOT/thomas/
```

If you decided to change path of this folder make sure to move all users repositories.


## Django Server Application
Next, python environment variable PYTHONPATH will be set to "/libs" folder so Djacket can
run successfully with it's runtime libraries paths provided.
After that Django "manage.py" actions should run. These actions are committed using these commands:
```
./manage.py makemigrations
./manage.py migrate
./manage.py collectstatic
./manage.py createsuperuser
```
During these, database migrations, collection of static files and creation of super user are done.


## Security
There are some security considerations that should be done.
First user should enter their server IP address or domain name in one of formats accepted by Django framework
to be provided in ALLOWED_HOSTS variable in "core/backend/djacket/settings.py" like this:
```
ALLOWED_HOSTS = ['.example.com']
or
ALLOWED_HOSTS = ['www.example.com']
or
ALLOWED_HOSTS = ['123.123.123.123']
```
Then Django secret key is generated and put to "core/backend/djacket/settings.py":
```
SECRET_KEY = 'some random generated string'
```
During installation a random secret key will be generated automatically and installed.


## Ready
Now your Djacket application is completely setup.
The only thing here is configuring the web server to host application, static and media files.
Nginx is the recommended web server. If you already have Apache installed on your server there's no problem for these two to work along since your Nginx configuration will not conflict with Apache if you do it right.

An example of Nginx configuration is shown below. Assuming that you started Djacket on port 8080 with command:

```
./djacket.sh start 8080
```
then you can configure Nginx to have a server as:

```
server {
listen 8585;
server_name example.com;
client_max_body_size 32M; # Maximum acceptable payload for an upload. If more than 32MB is needed, change it to higher values.
location / {
proxy_set_header Host $http_host;
proxy_pass http://0.0.0.0:8080; # Port number Djacket is started on.
}
location /media {
alias /path/to/djacket-v0.1.0/core/media/;
}
location /static {
alias /path/to/djacket-v0.1.0/core/static/;
}
}
```

Now if you visit http://example.com:8585, you have a fully functioning Djacket.

# Other configurations
You can also deploy Djacket using other technologies such as Apache/mod_wsgi or Nginx/uwsgi, although installation script
prefers Nginx/gunicorn.

Nevertheless if you prefer other stacks, everything is the same up until "Ready" section.
When you reach "Ready" section your Djacket Django application is fully functional and is kept under "core" folder.
Now you can deploy it as a Django application using Apache/mod_wsgi or Nginx/uswgi, etc.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2016 Djacket Project.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
120 changes: 120 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Djacket
A Git management system written in [Python/Django](https://www.djangoproject.com/). It's meant to be for personal
or small business usages. Installation is available and tested for Linux servers.

<p align="center">
<img src="index.png" alt="Index"/>
</p>


# Requirements
Djacket requires these packages:
```
- Git (version 1.8 or above)
- Python3 and pip3 (any version of Python version 3.x)
- Pillow imaging library (https://pypi.python.org/pypi/Pillow)
```
to be installed and working.


# Installation
Download latest release from https://github.com/Djacket/djacket/releases/latest, then extract and install:
```
tar xzvf djacket-v0.1.0.tar.gz
cd djacket-v0.1.0
bash setup-djacket.sh
```
after installation you can start Djacket by running
```
./djacket.sh start 8080
```
Your web server should be configured to serve Djacket and it's static and media files. After installation, folder path for
static and media files is printed out for server settings. [Nginx](http://nginx.org/en/) is the recommended web server (and it can work along with your existing installation of Apache too).
In your Nginx configuration put (assuming your domain is example.com):
```
server {
listen 8585;
server_name example.com;
client_max_body_size 32M;
location / {
proxy_set_header Host $http_host;
proxy_pass http://0.0.0.0:8080; # Port number Djacket is started on.
}
location /media {
alias /path/to/djacket-v0.1.0/core/media/;
}
location /static {
alias /path/to/djacket-v0.1.0/core/static/;
}
}
```
Now if you visit http://example.com:8585, you have a fully functioning Djacket.


For more details, troubleshooting or manual installation see [INSTALL](./INSTALL.md) file.


# Contribution
Djacket's backend technology is [Python/Django](https://www.djangoproject.com/) v1.8. aside from this, libraries:
```
python-dateutil
django-easy-pjax
```
are used, so if you want to make changes to backend you need these installed. These libraries will be provided inside libs
folder for each release.

Frontend is maintained using [gulpjs](http://gulpjs.com/) and [bower](http://bower.io/), so first make sure you have
[nodejs](https://nodejs.org/en/) and gulp installed globally then inside core/frontend, run
```
npm install
```
Now you can make changes to frontend views, styles and scripts by modifying files in core/frontend/public/dev.
Any changes you make will be compiled by gulp and pushed to build folder. So if you made any changes make sure to do
```
gulp compile
```
which runs the compilation task or if you are on constant development run
```
gulp
```
so default task will run (which is watching for file changes and pushing them to build folder)


# Issues
If you encountered any bugs or issues, Please report it either in Github issues section or send it as
an email to [projectdjacket@gmail.com](mailto:projectdjacket@gmail.com)


# Documentation
Project is fully documented and it can be reached by going to:
```
/admin/doc/
```
"docutils" package is required for browsing through.


# License

The MIT License (MIT)

Copyright (c) 2016 Djacket Project.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 changes: 10 additions & 0 deletions SIGN
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

o 88 .o
8888ooooo. 88 ooo .88
8d88' `888b .o .oooo88 .ooooooo 88 8. .oooooo o8888oo
888 888 .88 d88` '88b d88` 88o. doo ""888""
888 888 8 88 888 888 888 88o. 88oooo 888
888 888 88 888 .888 b88 88 8. boo 888 .
888 . .888 88 '88bod`888 .ooooooo 88 ooo .oooooo "888Y
88888`bod8P' 88
Y88"
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.1.0
50 changes: 50 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Djacket /core

This folder contains core application.

## /backend
Django project is inside this folder with all the applications.
Apps inside are:

- djacket: main Django project folder.
- filter: creates custom Djacket template filters.
- git: Djacket's Git library for interactions
with repositories.
- repository: creates/modifies repositories.
- user: creates/modifies users and their profiles.
- utils: has extra tools useful across the whole project.

If using default settings from installation script [SQLite](https://www.sqlite.org/) database file will be kept here. PostgreSQL database settings are available in settings.py for a more advanced database approach.

## /frontend
Contains view and static files for development and production. All styles, scripts and views templates are developed under /public/dev folder then using ["gulp"](http://gulpjs.com/) tasks they are compiled and pushed to /public/build path for production.
For any customization, first make sure you have
[nodejs](https://nodejs.org/en/) and gulp installed globally then inside /frontend folder, run

```
npm install
```

Now you can make changes to gulpfile and commit them.
[Bower](http://bower.io/) configurations are available as well in ".bowerrc" file.
For any customization, inside /frontend folder first run

```
bower install
```

then you can make changes to frontend libraries such as [jQuery](https://jquery.com/), [Chart.js](www.chartjs.org/), [Font-Awesome](https://fortawesome.github.io/Font-Awesome/), etc.

## /media
As of right now only user avatar images are kept are.

## /static
Contains static files. All static files will be piled up in here after installation script executes 'collectstatic'.
Webserver's (Apache, Nginx, etc) "/static" location should be pointed to this folder.
If there's a need for changing static folder, you can change variable 'STATIC_ROOT' in backend/djacket/settings.py and run

```
./manage.py collectstatic
```

Note that your Webserver's settings should be changed then too.
Empty file.
Loading

0 comments on commit 1b13153

Please sign in to comment.