# Wallabag

## Compose services

This is the Wallabag + Postgres part of the stack in  `docker-compose.yml`:

```yaml
version: "3.9"

services:
  certbot:
    image: certbot/certbot:latest
    container_name: certbot
    volumes:
      - ./certbot/www:/var/www/certbot
      - ./certbot/conf:/etc/letsencrypt

  nginx:
    image: nginx:alpine
    container_name: nginx
    restart: unless-stopped
    depends_on:
      - freshrss
      - wallabag
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/conf.d:/etc/nginx/conf.d:ro
      - ./certbot/www:/var/www/certbot:ro
      - ./certbot/conf:/etc/letsencrypt:ro

  postgres:
    image: postgres:16
    container_name: postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: change_this_admin_password
    volumes:
      - ./postgres_data:/var/lib/postgresql/data
      - ./initdb:/docker-entrypoint-initdb.d
    ports:
      - "5432:5432"

  wallabag:
    image: wallabag/wallabag:latest
    container_name: wallabag
    restart: unless-stopped
    depends_on:
      - postgres
    environment:
      SYMFONY__ENV__DOMAIN_NAME: "https://wallabag.manxialiu.org"
      SYMFONY__ENV__DATABASE_DRIVER: pdo_pgsql
      SYMFONY__ENV__DATABASE_HOST: postgres
      SYMFONY__ENV__DATABASE_PORT: 5432
      SYMFONY__ENV__DATABASE_NAME: wallabag
      SYMFONY__ENV__DATABASE_USER: wallabag
      SYMFONY__ENV__DATABASE_PASSWORD: change_this_wallabag_password
    volumes:
      - ./wallabag/data:/var/www/wallabag/data
      - ./wallabag/images:/var/www/wallabag/web/assets/images
```

## Data migration

Manual approach:

* In Wallabag, go to **All entries**.
* Click **Export** (top right).
* Download `all_articles_json`.
* Import the file into the new Wallabag.

Limitation: user accounts are not migrated. TODO: migrate via database.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9