mirror of https://github.com/wallabag/wallabag.git
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
This commit is contained in:
parent
3ed30d3415
commit
2a61e13fae
|
@ -1,11 +1,41 @@
|
|||
# How to contribute
|
||||
|
||||
## Test it locally
|
||||
|
||||
### Using Docker
|
||||
|
||||
- Clone the repository
|
||||
- Ensure your Docker daemon is running
|
||||
- Launch `docker-compose up`
|
||||
|
||||
You'll then have:
|
||||
- a web server (nginx)
|
||||
- a PHP daemon (using FPM)
|
||||
- a Redis database (to handle imports)
|
||||
- a SQLite database to store articles
|
||||
|
||||
You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
|
||||
|
||||
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.
|
||||
|
||||
### Using your own PHP server
|
||||
|
||||
- Ensure you are running PHP > 7.1.
|
||||
- Clone the repository
|
||||
- Launch `composer install`
|
||||
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)
|
||||
- Then `php bin/console wallabag:install`
|
||||
- If you got some errors, fix them (they might be related to some missing PHP extension from your machine)
|
||||
- Run `php bin/console server:run`
|
||||
|
||||
You can now access your wallabag instance using that url: `http://127.0.0.1:8000`
|
||||
|
||||
## You found a bug
|
||||
Please [open a new issue](https://github.com/wallabag/wallabag/issues/new).
|
||||
|
||||
To fix the bug quickly, we need some infos: please answer to the questions in the issue form.
|
||||
|
||||
If you have the skills, look for errors into php, server and application (see `var/logs`) logs.
|
||||
If you have the skills, look for errors into PHP, server and application logs (see `var/logs`).
|
||||
|
||||
Note : If you have large portions of text, use [Github's Gist service](https://gist.github.com/) or other pastebin-like.
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
version: '2'
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- ./docker/nginx/nginx.conf:/nginx.conf
|
||||
- ./docker/logs/nginx:/var/log/nginx
|
||||
|
@ -32,8 +32,8 @@ services:
|
|||
# - ./docker/postgres/env
|
||||
# - ./docker/mariadb/env
|
||||
|
||||
#postgres:
|
||||
# image: postgres:9
|
||||
# postgres:
|
||||
# image: postgres:11-alpine
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
# volumes:
|
||||
|
@ -41,7 +41,7 @@ services:
|
|||
# env_file:
|
||||
# - ./docker/postgres/env
|
||||
|
||||
#mariadb:
|
||||
# mariadb:
|
||||
# image: mariadb:10
|
||||
# ports:
|
||||
# - "3306:3306"
|
||||
|
@ -50,12 +50,12 @@ services:
|
|||
# env_file:
|
||||
# - ./docker/mariadb/env
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:3-management
|
||||
ports:
|
||||
- "15672:15672"
|
||||
# rabbitmq:
|
||||
# image: rabbitmq:3-management-alpine
|
||||
# ports:
|
||||
# - "15672:15672"
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
image: redis:4-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
|
|
@ -4,10 +4,25 @@ FROM php:7.2-fpm
|
|||
ARG timezone='Europe/Paris'
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libmcrypt-dev libicu-dev libpq-dev libxml2-dev libpng-dev libjpeg-dev \
|
||||
&& /usr/local/bin/docker-php-ext-configure gd --with-jpeg-dir=/usr/include \
|
||||
&& docker-php-ext-install \
|
||||
iconv mbstring intl pdo pdo_mysql pdo_pgsql gd
|
||||
libmcrypt-dev \
|
||||
libicu-dev \
|
||||
libpq-dev \
|
||||
libxml2-dev \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libsqlite3-dev \
|
||||
imagemagick \
|
||||
libmagickwand-dev
|
||||
RUN docker-php-ext-install \
|
||||
iconv \
|
||||
mbstring \
|
||||
intl \
|
||||
pdo \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pdo_sqlite
|
||||
|
||||
RUN printf "\n" | pecl install imagick && docker-php-ext-enable imagick
|
||||
|
||||
RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini
|
||||
|
||||
|
|
Loading…
Reference in New Issue