diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-19 14:54:38 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-06-19 14:54:38 +0200 |
commit | 2a61e13fae4e71c804e96caefd3fdb46f09a81db (patch) | |
tree | b424699c636777b1b83f2143ba1c40b8610b2cad | |
parent | 3ed30d3415842de43bed332e2228d5b2157472cc (diff) | |
download | wallabag-2a61e13fae4e71c804e96caefd3fdb46f09a81db.tar.gz wallabag-2a61e13fae4e71c804e96caefd3fdb46f09a81db.tar.zst wallabag-2a61e13fae4e71c804e96caefd3fdb46f09a81db.zip |
Improve CONTRIBUTING guide
Also:
- update the docker-compose to use Alpine image (lighter)
- update the PHP Dockerfile to use Imagick instead of GD (for GIF support when downloading images) and add support for SQLite
-rw-r--r-- | .github/CONTRIBUTING.md | 32 | ||||
-rw-r--r-- | docker-compose.yml | 20 | ||||
-rw-r--r-- | docker/php/Dockerfile | 23 |
3 files changed, 60 insertions, 15 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 920f1905..d5599206 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md | |||
@@ -1,11 +1,41 @@ | |||
1 | # How to contribute | 1 | # How to contribute |
2 | 2 | ||
3 | ## Test it locally | ||
4 | |||
5 | ### Using Docker | ||
6 | |||
7 | - Clone the repository | ||
8 | - Ensure your Docker daemon is running | ||
9 | - Launch `docker-compose up` | ||
10 | |||
11 | You'll then have: | ||
12 | - a web server (nginx) | ||
13 | - a PHP daemon (using FPM) | ||
14 | - a Redis database (to handle imports) | ||
15 | - a SQLite database to store articles | ||
16 | |||
17 | You can now access your wallabag instance using that url: `http://127.0.0.1:8000` | ||
18 | |||
19 | If you want to test using an other database than SQLite, uncomment the `postgres` or `mariadb` code from the `docker-compose.yml` file at the root of the repo. Also uncomment related line in the `php` section so the database will be linked to your PHP instance. | ||
20 | |||
21 | ### Using your own PHP server | ||
22 | |||
23 | - Ensure you are running PHP > 7.1. | ||
24 | - Clone the repository | ||
25 | - Launch `composer install` | ||
26 | - If you got some errors, fix them (they might be related to some missing PHP extension from your machine) | ||
27 | - Then `php bin/console wallabag:install` | ||
28 | - If you got some errors, fix them (they might be related to some missing PHP extension from your machine) | ||
29 | - Run `php bin/console server:run` | ||
30 | |||
31 | You can now access your wallabag instance using that url: `http://127.0.0.1:8000` | ||
32 | |||
3 | ## You found a bug | 33 | ## You found a bug |
4 | Please [open a new issue](https://github.com/wallabag/wallabag/issues/new). | 34 | Please [open a new issue](https://github.com/wallabag/wallabag/issues/new). |
5 | 35 | ||
6 | To fix the bug quickly, we need some infos: please answer to the questions in the issue form. | 36 | To fix the bug quickly, we need some infos: please answer to the questions in the issue form. |
7 | 37 | ||
8 | If you have the skills, look for errors into php, server and application (see `var/logs`) logs. | 38 | If you have the skills, look for errors into PHP, server and application logs (see `var/logs`). |
9 | 39 | ||
10 | Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like. | 40 | Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like. |
11 | 41 | ||
diff --git a/docker-compose.yml b/docker-compose.yml index 3c28f2f1..0f8f0970 100644 --- a/docker-compose.yml +++ b/docker-compose.yml | |||
@@ -1,9 +1,9 @@ | |||
1 | version: '2' | 1 | version: '2' |
2 | services: | 2 | services: |
3 | nginx: | 3 | nginx: |
4 | image: nginx | 4 | image: nginx:alpine |
5 | ports: | 5 | ports: |
6 | - "8080:80" | 6 | - "8000:80" |
7 | volumes: | 7 | volumes: |
8 | - ./docker/nginx/nginx.conf:/nginx.conf | 8 | - ./docker/nginx/nginx.conf:/nginx.conf |
9 | - ./docker/logs/nginx:/var/log/nginx | 9 | - ./docker/logs/nginx:/var/log/nginx |
@@ -32,8 +32,8 @@ services: | |||
32 | # - ./docker/postgres/env | 32 | # - ./docker/postgres/env |
33 | # - ./docker/mariadb/env | 33 | # - ./docker/mariadb/env |
34 | 34 | ||
35 | #postgres: | 35 | # postgres: |
36 | # image: postgres:9 | 36 | # image: postgres:11-alpine |
37 | # ports: | 37 | # ports: |
38 | # - "5432:5432" | 38 | # - "5432:5432" |
39 | # volumes: | 39 | # volumes: |
@@ -41,7 +41,7 @@ services: | |||
41 | # env_file: | 41 | # env_file: |
42 | # - ./docker/postgres/env | 42 | # - ./docker/postgres/env |
43 | 43 | ||
44 | #mariadb: | 44 | # mariadb: |
45 | # image: mariadb:10 | 45 | # image: mariadb:10 |
46 | # ports: | 46 | # ports: |
47 | # - "3306:3306" | 47 | # - "3306:3306" |
@@ -50,12 +50,12 @@ services: | |||
50 | # env_file: | 50 | # env_file: |
51 | # - ./docker/mariadb/env | 51 | # - ./docker/mariadb/env |
52 | 52 | ||
53 | rabbitmq: | 53 | # rabbitmq: |
54 | image: rabbitmq:3-management | 54 | # image: rabbitmq:3-management-alpine |
55 | ports: | 55 | # ports: |
56 | - "15672:15672" | 56 | # - "15672:15672" |
57 | 57 | ||
58 | redis: | 58 | redis: |
59 | image: redis | 59 | image: redis:4-alpine |
60 | ports: | 60 | ports: |
61 | - "6379:6379" | 61 | - "6379:6379" |
diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index b632cb8a..d9b2e5cc 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile | |||
@@ -4,10 +4,25 @@ FROM php:7.2-fpm | |||
4 | ARG timezone='Europe/Paris' | 4 | ARG timezone='Europe/Paris' |
5 | 5 | ||
6 | RUN apt-get update && apt-get install -y \ | 6 | RUN apt-get update && apt-get install -y \ |
7 | libmcrypt-dev libicu-dev libpq-dev libxml2-dev libpng-dev libjpeg-dev \ | 7 | libmcrypt-dev \ |
8 | && /usr/local/bin/docker-php-ext-configure gd --with-jpeg-dir=/usr/include \ | 8 | libicu-dev \ |
9 | && docker-php-ext-install \ | 9 | libpq-dev \ |
10 | iconv mbstring intl pdo pdo_mysql pdo_pgsql gd | 10 | libxml2-dev \ |
11 | libpng-dev \ | ||
12 | libjpeg-dev \ | ||
13 | libsqlite3-dev \ | ||
14 | imagemagick \ | ||
15 | libmagickwand-dev | ||
16 | RUN docker-php-ext-install \ | ||
17 | iconv \ | ||
18 | mbstring \ | ||
19 | intl \ | ||
20 | pdo \ | ||
21 | pdo_mysql \ | ||
22 | pdo_pgsql \ | ||
23 | pdo_sqlite | ||
24 | |||
25 | RUN printf "\n" | pecl install imagick && docker-php-ext-enable imagick | ||
11 | 26 | ||
12 | RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini | 27 | RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini |
13 | 28 | ||