chrisvel / wreeto_official

Wreeto is an open source note-taking, knowledge management and wiki system.
https://wreeto.com
GNU Affero General Public License v3.0
387 stars 13 forks source link

Docker image doesnt work on Synology NAS #16

Closed jhjacobs81 closed 4 years ago

jhjacobs81 commented 4 years ago

It apears to be because of a lack of PostgreSQL connection. Is it possible to build one with SQLite instead?

chrisvel commented 4 years ago

@jhjacobs81 You need to use all the images included in the docker-compose.yml file. Why don't you spin a postgres:11 container?

Also, check out this issue https://github.com/chrisvel/wreeto_official/issues/12, it is Synology NAS related.

SQLite was the first DB of wreeto. Unfortunately, it had issues with concurrency and scaling, so I switched to pSQL. Maybe a variety of DBs will be offered in the future (SQLite or MySQL for example) but for now it's not that urgent and up in the roadmap.

AlexKalopsia commented 4 years ago

I can confirm that this works for me on my Synology NAS

version: '3.7'
services:
  postgres:
    image: postgres:11
    env_file: .env
    volumes:
    - /volume1/docker/wreeto/postgres-data:/var/lib/postgresql/data
    logging:
      driver: json-file
      options:
        max-size: "10m"
  app:
    image: chrisvel/wreeto:latest
    command: foreman start 
    volumes:
      - /volume1/docker/wreeto/app:/app/wreeto
      - /volume1/docker/wreeto/app/public/assets:/app/wreeto/public/assets
    ports:
      - 8383:8383
    depends_on:
      - postgres
      - redis
    env_file: .env
    environment:
      RAILS_ENV: 'development'
    logging:
      driver: json-file
      options:
        max-size: "10m"
  redis:
    image: redis:5.0.7
    logging:
      driver: json-file
      options:
        max-size: "10m"

content of the .env file:

OAUTH_GOOGLE_ID=
OAUTH_GOOGLE_SECRET=
POSTGRES_HOST=postgres
POSTGRES_USER=wreeto_admin
POSTGRES_PASSWORD=wreeto_password
POSTGRES_DB=wreeto_dev
POSTGRES_PORT=5432
RACK_ENV=development
RAILS_ENV=development
RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=
REDIS_HOST=redis
REDIS_PASSWORD=
SMTP_USERNAME=
SMTP_PASSWORD=
WREETO_HOST=192.168.1.200
WREETO_PORT=8383
jhjacobs81 commented 4 years ago

I could not get the synology nas to work with the docker-compose file :( in any case, I have since moved on and sold the sinology to set up a proxmox system, and now everything works :)