acheong08 / obi-sync

Reverse engineering of the native Obsidian sync and publish server
https://obsidian.md/sync
GNU General Public License v2.0
1.01k stars 60 forks source link

docker support? #4

Closed wangweitung closed 1 year ago

wangweitung commented 1 year ago

thanks for your work,are there any possibilities that publish a docker version?

acheong08 commented 1 year ago

Unlikely to work on it myself until I get full feature parity with the official sync. Feel free to make a PR though.

wangweitung commented 1 year ago

Unlikely to work on it myself until I get full feature parity with the official sync. Feel free to make a PR though.

thanks for your reply。 hope to see docker version soon

rmonvfer commented 1 year ago

Hello! I'd be glad to open a PR adding Docker support, is that OK @acheong08?

I've also noticed that this is probably going to require some refactoring in the DB layer (e.g: removing hardcoded credentials and using an ORM to make future updates easier)

acheong08 commented 1 year ago

100%!

acheong08 commented 1 year ago

removing hardcoded credentials

Ah yes. I forgot about the example user.

using an ORM to make future updates easier

👍🏻. Not something I have much experience in. Help would be greatly appreciated.

acheong08 commented 1 year ago

Closed by #8

wangweitung commented 1 year ago

Closed by #8

I noticed that docker version was published. thanks for ur work (@panoti).

adding docker run command makes it much more easier to use:

like how to run the docker,setting the port and register an account.

acheong08 commented 1 year ago

using an ORM to make future updates easier @rmonvfer

I'm working on refactoring to use gorm on the gorm branch.

panoti commented 1 year ago

@acheong08 I want to bring sign up to API handler instead of cmd. What do you think?

acheong08 commented 1 year ago

register an account.

I think I'll create a dedicated API/embedded page for that to make it easier in the future

like how to run the docker

I'll need to learn that as well. I don't have it installed

acheong08 commented 1 year ago

@acheong08 I want to bring sign up to API handler instead of cmd. What do you think?

Lmao I was just typing that

rmonvfer commented 1 year ago

Is this done? I can work on a docker-compose file to make the development setup even easier.

acheong08 commented 1 year ago

Is this done?

ORM: #12

Docker: #8 and #9

panoti commented 1 year ago

@wangweitung this is my docker-compose.yml file

version: '3.8'

services:
  obsidian_sync:
    image: ghcr.io/acheong08/rev-obsidian-sync:main
    container_name: obsidian_sync
    ports:
      - 3000:3000
    environment:
      - DOMAIN_NAME=localhost:3000
      - ADDR_HTTP=0.0.0.0:3000
      - SIGNUP_KEY=signup_key_secret
    volumes:
      - sync_data:/data

volumes:
  sync_data:

Sign up user

curl --request POST \
  --url http://localhost:3000/user/signup \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "test@gmail.com",
    "password": "password",
    "name": "Test",
    "signup_key": "signup_key_secret"
}'
wangweitung commented 1 year ago

👍,thanks a lot. could this be added into the repo readme?@acheong08

acheong08 commented 1 year ago

could this be added into the repo readme?@acheong08

Will be added on the next release. Currently testing due to migration to gorm. There are some bugs to be found & patched.

Will write proper tests soon™.