Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker-compose file in repo #261

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
MYSQL_ROOT_PASSWORD=wallaroot
MYSQL_HOST=db
MYSQL_DATABASE=wallabag
MYSQL_USER=wallabag
MYSQL_PASSWORD=wallabag_password

MAILER_HOST=127.0.0.1
MAILER_USER=~
MAILER_PASSWORD=~

FROM_EMAIL=wallabag@example.com
SERVER_PORT=8080
SERVER_URL=http://localhost:${SERVER_PORT}
SERVER_NAME="Your wallabag instance"


WALLABAG_DATA_IMAGES=./data/wallabag_images
MYSQL_DATA=./data/mysql
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.cache
__pycache__/*
*.pyc
.env
/data
38 changes: 4 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,40 +107,10 @@ $ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/con

## docker-compose

It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:

```
version: '3'
services:
wallabag:
image: wallabag/wallabag
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-url-instance.com
- SYMFONY__ENV__SERVER_NAME="Your wallabag instance"
ports:
- "80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
- /opt/wallabag/data:/var/lib/mysql
redis:
image: redis:alpine
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Just use use included `docker-compose` and `.env.example` files :
```
cp .env.example .env
docker-compose up -d
```

Note that you must fill out the mail related variables according to your mail config.
Expand Down
39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: '3'
services:
wallabag:
image: wallabag/wallabag
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
SYMFONY__ENV__DATABASE_DRIVER: pdo_mysql
SYMFONY__ENV__DATABASE_HOST: ${MYSQL_HOST}
SYMFONY__ENV__DATABASE_PORT: 3306
SYMFONY__ENV__DATABASE_NAME: ${MYSQL_DATABASE}
SYMFONY__ENV__DATABASE_USER: ${MYSQL_USER}
SYMFONY__ENV__DATABASE_PASSWORD: ${MYSQL_PASSWORD}
SYMFONY__ENV__DATABASE_CHARSET: utf8mb4
SYMFONY__ENV__MAILER_HOST: ${MAILER_HOST}
SYMFONY__ENV__MAILER_USER: ${MAILER_USER}
SYMFONY__ENV__MAILER_PASSWORD: ${MAILER_PASSWORD}
SYMFONY__ENV__FROM_EMAIL: ${FROM_EMAIL}
SYMFONY__ENV__DOMAIN_NAME: ${SERVER_URL}
SYMFONY__ENV__SERVER_NAME: ${SERVER_NAME}
ports:
- "${SERVER_PORT}:80"
volumes:
- ${WALLABAG_DATA_IMAGES}:/var/www/wallabag/web/assets/images

db:
image: mariadb
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
# MYSQL_DATABASE: # /!\ Do not set this : https://github.com/wallabag/docker/issues/138#issuecomment-460075215
volumes:
- ${MYSQL_DATA}:/var/lib/mysql

redis:
image: redis:alpine
restart: unless-stopped