|
1 | 1 | Installation |
2 | 2 | ************ |
3 | 3 |
|
4 | | -Manual installation (recommended) |
5 | | -================================= |
| 4 | +Manual installation (recommended for production) |
| 5 | +================================================ |
6 | 6 |
|
7 | 7 | Install system dependencies: |
8 | 8 |
|
@@ -228,3 +228,59 @@ Start uwsgi and nginx servers: |
228 | 228 | Your Pytition home page should be available over there: http://mydomain.tld |
229 | 229 |
|
230 | 230 | Now it's time to :ref:`Configure<Configuration>` your Pytition instance the way you want! |
| 231 | + |
| 232 | +Installation via Docker (recommended for development) |
| 233 | +===================================================== |
| 234 | + |
| 235 | +.. warning:: Please, do **NOT** use this in production. You would have tons of security and performance issues. You could lose your SECRET_KEY, you would run with Django's DEBUG setting enabled, you would be serving static files via Django basic webserver. You would be running with no HTTPS possibility at all. etc etc. Please : don't. |
| 236 | + |
| 237 | +Clone latest development version of Pytition: |
| 238 | + |
| 239 | +.. code-block:: bash |
| 240 | +
|
| 241 | + $ git clone https://github.com/pytition/pytition |
| 242 | +
|
| 243 | +Install docker and docker-compose: |
| 244 | + |
| 245 | +.. code-block:: bash |
| 246 | +
|
| 247 | + $ sudo apt install docker.io docker-compose |
| 248 | +
|
| 249 | +Put your user in the docker group (needed for Ubuntu 18.04) and start docker daemon: |
| 250 | + |
| 251 | +.. code-block:: bash |
| 252 | +
|
| 253 | + $ sudo usermod -a -G docker $USER |
| 254 | + $ # log-in again as your user for group change to take effect |
| 255 | + $ # or just type the following line |
| 256 | + $ su -l $USER |
| 257 | + $ sudo systemctl enable docker |
| 258 | + $ sudo systemctl start docker |
| 259 | +
|
| 260 | +For the first run you need to create the database container and let it be ready: |
| 261 | + |
| 262 | +.. code-block:: bash |
| 263 | +
|
| 264 | + $ docker-compose up --build db |
| 265 | +
|
| 266 | +Wait until it prints something like:: |
| 267 | + |
| 268 | + LOG: database system is ready to accept connections |
| 269 | + |
| 270 | +Then hit ^C (ctrl+C) to shutdown the database container. |
| 271 | + |
| 272 | +From now on, you can just type this to run Pytition in a container: |
| 273 | + |
| 274 | +.. code-block:: bash |
| 275 | +
|
| 276 | + $ docker-compose up --build |
| 277 | +
|
| 278 | +Last command before being able to click on the "http://0.0.0.0:8000/" link that the "web" container prints to out on the console. You need to run migrations, install static files, compile language files, create an admin account and lastly populate your database with some dummy data. You can do all of this with the `dev/initialize.sh` script: |
| 279 | + |
| 280 | +.. code-block:: bash |
| 281 | +
|
| 282 | + $ docker-compose exec web ./dev/initialize.sh |
| 283 | +
|
| 284 | +Aaaand that's it! You can now just click on the "http://0.0.0.0:8000/" link! |
| 285 | + |
| 286 | +Next time, just run ``$ docker-compose up --build`` |
0 commit comments