Giter VIP home page Giter VIP logo

journal's People

Contributors

dependabot[bot] avatar guidopetri avatar hslzr avatar inoda avatar jtagcat avatar koterpillar avatar rflrkn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

journal's Issues

rbenv `/usr/bin/env: ‘bash’: No such file or directory` when creating a systemd service

I've followed the steps outlined in vps.md to set up Journal, and I have managed to get it running on manual starts quite easily.

However, I'm running into issues when creating a systemd service using the guide, and the service always fails.
running journalctl -u journal.service gives me the error:

rbenv[1215]: /usr/bin/env: ‘bash’: No such file or directory

After logging into the journal user, running the command

/home/journal/.rbenv/bin/rbenv exec bundle exec rails s

manually works correctly, it's only when the service starts is when the problem occurs.
What do you think could be going wrong?

My journal.service file for context:

[Unit]
Description=InodaJournal
After=network.target

[Service]
Type=simple
User=journal
Group=journal
WorkingDirectory=/home/journal/journal
Environment="JOURNAL_DATABASE_PASSWORD=***"
Environment="CIPHER_KEY=***"
Environment="SHARING_TOKEN_CIPHER_IV=***"
Environment="RAILS_ENV=production"
Environment="SECRET_KEY_BASE=***"
Environment="PATH=/home/journal/"
ExecStart=/home/journal/.rbenv/bin/rbenv exec bundle exec rails s
TimeoutSec=30
RestartSec=15s
Restart=always

[Install]
WantedBy=multi-user.target

end of life ruby 2.6.6

WARNING: ruby-2.6.6 is past its end of life and is now unsupported. 
It no longer receives bug fixes or critical security updates.

ISO8601 for dates

I'm fine with having it as an option, but why use a custom format?

Adding SMTP configuration

Email notification of new logins is enabled but only possible using SendGrid credentials. I would suggest adding environment variables to allow sending emails using SMTP servers of our own, if possible. I would work on a PR but my knowledge is not that extensive yet, so I will try to do my best in order to implement it. However, I want to point out this feature to others as I am sure more qualified people will know how to do this.

Better installation docs

This is kind of a collection of things I had to do to install Journal on a VPS.

  • no need for yarn install
  • skipped installing with homebrew (why would I install this on linux if I don't need it? Installed by running the script's commands manually:
    • created a linux user for journal
    • created a postgres user for journal with sudo -u postgres createuser -D -A -P journal
    • followed these instructions to install ruby (2.6.5) and bundler
    • cloned the journal repo and exported the correct ENV variables with the journal user
    • created + migrated the db with rake
    • switched to RAILS_ENV="production", which meant also editing the config/environments/production.rb file:
      • added config.hosts << my.host.tld
      • commented out config.assets.compile = false
    • changed port in config/puma.rb from 3000 to my own value (I actually think this can be set later when you call rails, but I'm not sure)

Then, running bundle exec rails s in the folder as the user journal should work for launching the application. To make it a systemd service was a little more complex. This is what the service file ended up looking like:

[Unit]
Description=InodaJournal
After=network.target

[Service]
Type=simple
User=journal
Group=journal
WorkingDirectory=/home/journal/journal
Environment="JOURNAL_DATABASE_PASSWORD=..."
Environment="CIPHER_KEY=..."
Environment="SHARING_TOKEN_CIPHER_IV=..."
Environment="RAILS_ENV=production"
Environment="SECRET_KEY_BASE=..."
Environment="PATH=/your/full/journal/user/path"
ExecStart=/home/journal/.rbenv/bin/rbenv exec bundle exec rails s
TimeoutSec=30
RestartSec=15s
Restart=always

[Install]
WantedBy=multi-user.target

The one thing that got me with systemd was that initially I was missing bash in my PATH, so the service was just returning a 127 error code. I found out that bash was missing by looking at journalctl -b logs.

This basically was installing Journal on a VPS without homebrew (not required) and without Docker, setting it up as a system service. If you want, I can try to write this into a .md and make a PR, but I'd just figure I'd write this down first of all so that if anyone ever wants to do the same, they have something to rely on.

Docker Compose file?

Hey why is there no docker compose file.
This is how I usually always spool up my containers and there is none supplied.

Do you plan on adding one?

Sharing posts: ERR 500

Sharing a post, either public or private results in 500.

I, [2022-01-14T03:41:51.882733 #1]  INFO -- : [f230c88b-5da6-4ef3-878f-e468e6a9e47c] Started PUT "/posts/1/share?public=true" for 172.31.0.1 at 2022-01-14 03:41:51 +0000
I, [2022-01-14T03:41:51.883965 #1]  INFO -- : [f230c88b-5da6-4ef3-878f-e468e6a9e47c] Processing by PostsController#share as HTML
I, [2022-01-14T03:41:51.884068 #1]  INFO -- : [f230c88b-5da6-4ef3-878f-e468e6a9e47c]   Parameters: {"authenticity_token"=>"redactedcGiA==", "public"=>"true", "id"=>"1"}
D, [2022-01-14T03:41:51.887228 #1] DEBUG -- : [f230c88b-5da6-4ef3-878f-e468e6a9e47c]   Post Load (0.6ms)  SELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
I, [2022-01-14T03:41:51.889193 #1]  INFO -- : [f230c88b-5da6-4ef3-878f-e468e6a9e47c] Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.6ms | Allocations: 906)
F, [2022-01-14T03:41:51.889877 #1] FATAL -- : [f230c88b-5da6-4ef3-878f-e468e6a9e47c]
[f230c88b-5da6-4ef3-878f-e468e6a9e47c] NoMethodError (undefined method `unpack1' for nil:NilClass):
[f230c88b-5da6-4ef3-878f-e468e6a9e47c]
[f230c88b-5da6-4ef3-878f-e468e6a9e47c] app/models/post.rb:24:in `encrypted_sharing_token'
[f230c88b-5da6-4ef3-878f-e468e6a9e47c] app/managers/post_manager.rb:15:in `block in share'
[f230c88b-5da6-4ef3-878f-e468e6a9e47c] app/managers/post_manager.rb:13:in `loop'
[f230c88b-5da6-4ef3-878f-e468e6a9e47c] app/managers/post_manager.rb:13:in `share'
[f230c88b-5da6-4ef3-878f-e468e6a9e47c] app/controllers/posts_controller.rb:68:in `share'

DockerCompose Ruby Error

I was trying to load the Docker Compose into my unRAID server. The Ruby version pulled was 2.2.6, but the gemfile was 3.1.2. This caused an error that failed the installation. Should the repo be updated to tell the docker to pull down a newer version of Ruby?

Apologies for my lack of a good explanation. I'm very green when it comes to any kind of programming.

Set/Edit date of entry

It'd be neet if I could do relative days (actual date changed while awake, but considering it the same day), backlogs (entry for a few days before) and ports (manual migration from elsewhere).

Remove prompts

New prompts may be added at /prompts, yet additions can not be removed.

Data import and export

I have entries elsewhere, and I'd like to import them. Export would also be peace of mind, as I'm not comfortable using something I can't easily get my data out of.

I'd propose Markdown, even though the body is plain. Only parsing front matter would be needed. Metadata should be imported/exported to/from front matter:

  • title (string)
  • date (iso8601)
  • id (when importing, check for no conflicts) (int)
  • publicly shared? (bool)
  • secretly shared (if not empty, string for secret link)

Dockerfile ruby version

The Gemfile uses ruby 2.6.6 but currently the Dockerfile fetches the 2.6.7.

The fix is to change the version on the Dockerfile from 2.6 to 2.6.6.

Blocked host: journal.xxxx.com

I'm running this is docker. Took the changes from the unmerged pull request as well for the docker-compose file
Error:

To allow requests to journal.xxxx.com, add the following to your environment configuration:

config.hosts << "journal.xxxx.com"

This happens even though I have a SITE_DOMAIN env in the production.rb file. Tried hardcoding the domain instead of passing it as an env, still having the issue.

[Feature Request] Full text search

Hi there !

Just installed your app on FreeBSD today, was looking for a simple diary app and I'm very satisfied so far.
Thanks for the good work !
I was wondering, do you plan to add a full text search feature ? I imagine something that could search in the title of the entry and/or in the text and show only the entries matching. If it could filter by date that'd be awesome too.
Finally (for the hype) if the search box could be dynamic (something showing the X first hits while typing the research) that would be perfect !
Sadly I can't really help with the code as I don't know ruby at all...
However I can help with the installation docs if needed.
Keep up the good job !
Best regards

Error while trying to install with docker-compose.yaml

Thanks for this app!

I saw it while searching for a self-hosted journal/diary app. It looks really nice and I want to give it a try but I get the following error when I try to create a stack with the given docker-compose.yaml:

failed to deploy a stack: journal Pulling journal Warning failed to solve: process "/bin/sh -c gem update --system" did not complete successfully: exit code: 1 

I am not very proficient in docker or docker compose; I have searched the net but I think I am the first one encountering this error ':)

My compose file is as follows:

networks:
  journal:
    internal: true
  proxy:

services:
  journal:
    build: https://github.com/inoda/journal.git#main
    image: gh-inoda-journal
    volumes:
      - /home/<user>/containers/journal/data:/app:rw
    environment:
      - RAILS_ENV=production
      - SITE_DOMAIN=diary.mydomain.com
      - DATABASE_URL=postgres://replaceme:RePLAcEpAsS@journal-db/placeholder
      - CIPHER_KEY=<some key>= # openssl rand -base64 32
      - SHARING_TOKEN_CIPHER_IV=<some vector>== # openssl rand -base64 16
      - SECRET_KEY_BASE=<some string> # random alphanumerical
    ports:
      - <a  port>:3000
    networks:
      - proxy
      - journal
    restart: unless-stopped

  journal-db:
    image: postgres:alpine
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "replaceme"]
    environment:
      - POSTGRES_DB=placeholder
      - POSTGRES_USER=replaceme
      - POSTGRES_PASSWORD=RePLAcEpAsS
    volumes:
      - /home/<user>/containers/journal/db:/var/lib/postgresql/data:rw
    networks:
      - journal
    restart: unless-stopped

Heroku deployment fails

I've tried to deploy Journal using the provided Heroku button, but it fails silently. After forking and redeploying it, I get this error undefined method 'unpack1' for nil:NilClass after running some of the migrations.

You can see the whole error log here:

D, [2020-07-23T14:23:48.285981 #20] DEBUG -- :    (15.1ms)  CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
D, [2020-07-23T14:23:48.296904 #20] DEBUG -- :    (8.2ms)  CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)
D, [2020-07-23T14:23:48.327941 #20] DEBUG -- :    (1.0ms)  SELECT pg_try_advisory_lock(3896631746945074410)
D, [2020-07-23T14:23:48.340743 #20] DEBUG -- :    (1.2ms)  SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
I, [2020-07-23T14:23:48.341781 #20]  INFO -- : Migrating to CreatePosts (20190608151826)
== 20190608151826 CreatePosts: migrating ======================================
-- create_table(:posts, {})
D, [2020-07-23T14:23:48.344985 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.353726 #20] DEBUG -- :    (8.6ms)  CREATE TABLE "posts" ("id" bigserial primary key, "title" bytea NOT NULL, "content" bytea NOT NULL, "title_iv" bytea NOT NULL, "content_iv" bytea NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
   -> 0.0102s
== 20190608151826 CreatePosts: migrated (0.0102s) =============================
D, [2020-07-23T14:23:48.361394 #20] DEBUG -- :   primary::SchemaMigration Create (1.1ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190608151826"]]
D, [2020-07-23T14:23:48.367978 #20] DEBUG -- :    (6.4ms)  COMMIT
I, [2020-07-23T14:23:48.368049 #20]  INFO -- : Migrating to CreateTags (20190608151934)
== 20190608151934 CreateTags: migrating =======================================
-- create_table(:tags, {})
D, [2020-07-23T14:23:48.369683 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.376802 #20] DEBUG -- :    (7.0ms)  CREATE TABLE "tags" ("id" bigserial primary key, "label" bytea NOT NULL, "label_iv" bytea NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
   -> 0.0084s
== 20190608151934 CreateTags: migrated (0.0085s) ==============================
D, [2020-07-23T14:23:48.378322 #20] DEBUG -- :   primary::SchemaMigration Create (1.0ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190608151934"]]
D, [2020-07-23T14:23:48.382514 #20] DEBUG -- :    (4.0ms)  COMMIT
I, [2020-07-23T14:23:48.382577 #20]  INFO -- : Migrating to CreatePostsTags (20190608152033)
== 20190608152033 CreatePostsTags: migrating ==================================
-- create_table(:post_tags, {})
D, [2020-07-23T14:23:48.384098 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.388836 #20] DEBUG -- :    (4.6ms)  CREATE TABLE "post_tags" ("id" bigserial primary key, "post_id" integer NOT NULL, "tag_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
   -> 0.0060s
-- add_index(:post_tags, :post_id)
D, [2020-07-23T14:23:48.396972 #20] DEBUG -- :    (3.4ms)  CREATE  INDEX  "index_post_tags_on_post_id" ON "post_tags"  ("post_id")
   -> 0.0081s
-- add_index(:post_tags, :tag_id)
D, [2020-07-23T14:23:48.403344 #20] DEBUG -- :    (3.2ms)  CREATE  INDEX  "index_post_tags_on_tag_id" ON "post_tags"  ("tag_id")
   -> 0.0063s
== 20190608152033 CreatePostsTags: migrated (0.0205s) =========================
D, [2020-07-23T14:23:48.404918 #20] DEBUG -- :   primary::SchemaMigration Create (1.0ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190608152033"]]
D, [2020-07-23T14:23:48.409670 #20] DEBUG -- :    (4.6ms)  COMMIT
I, [2020-07-23T14:23:48.409736 #20]  INFO -- : Migrating to CreateUsers (20190609224748)
== 20190609224748 CreateUsers: migrating ======================================
-- create_table(:users, {})
D, [2020-07-23T14:23:48.411493 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.419036 #20] DEBUG -- :    (7.4ms)  CREATE TABLE "users" ("id" bigserial primary key, "username" character varying NOT NULL, "password" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
   -> 0.0089s
== 20190609224748 CreateUsers: migrated (0.0090s) =============================
D, [2020-07-23T14:23:48.420507 #20] DEBUG -- :   primary::SchemaMigration Create (0.9ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190609224748"]]
D, [2020-07-23T14:23:48.425567 #20] DEBUG -- :    (4.9ms)  COMMIT
I, [2020-07-23T14:23:48.425632 #20]  INFO -- : Migrating to AddShareTokenToPosts (20190622045354)
== 20190622045354 AddShareTokenToPosts: migrating =============================
-- add_column(:posts, :sharing_token, :string)
D, [2020-07-23T14:23:48.427104 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.428764 #20] DEBUG -- :    (1.6ms)  ALTER TABLE "posts" ADD "sharing_token" character varying
   -> 0.0028s
-- add_index(:posts, :sharing_token, {:unique=>true})
D, [2020-07-23T14:23:48.437632 #20] DEBUG -- :    (4.5ms)  CREATE UNIQUE INDEX  "index_posts_on_sharing_token" ON "posts"  ("sharing_token")
   -> 0.0088s
== 20190622045354 AddShareTokenToPosts: migrated (0.0117s) ====================
D, [2020-07-23T14:23:48.439130 #20] DEBUG -- :   primary::SchemaMigration Create (1.0ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190622045354"]]
D, [2020-07-23T14:23:48.446434 #20] DEBUG -- :    (7.1ms)  COMMIT
I, [2020-07-23T14:23:48.446502 #20]  INFO -- : Migrating to ReviseSharingData (20190624033659)
== 20190624033659 ReviseSharingData: migrating ================================
-- remove_column(:posts, :sharing_token)
D, [2020-07-23T14:23:48.447860 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.452410 #20] DEBUG -- :    (4.4ms)  ALTER TABLE "posts" DROP COLUMN "sharing_token"
   -> 0.0056s
-- add_column(:posts, :sharing_token, :binary)
D, [2020-07-23T14:23:48.453805 #20] DEBUG -- :    (1.1ms)  ALTER TABLE "posts" ADD "sharing_token" bytea
   -> 0.0014s
-- add_column(:posts, :sharing_token_iv, :binary)
D, [2020-07-23T14:23:48.455434 #20] DEBUG -- :    (1.4ms)  ALTER TABLE "posts" ADD "sharing_token_iv" bytea
   -> 0.0016s
-- add_column(:posts, :listed_publicly, :boolean, {:null=>false, :default=>false})
D, [2020-07-23T14:23:48.458915 #20] DEBUG -- :    (2.2ms)  ALTER TABLE "posts" ADD "listed_publicly" boolean DEFAULT FALSE NOT NULL
   -> 0.0034s
-- add_index(:posts, :sharing_token, {:unique=>true})
D, [2020-07-23T14:23:48.465780 #20] DEBUG -- :    (3.8ms)  CREATE UNIQUE INDEX  "index_posts_on_sharing_token" ON "posts"  ("sharing_token")
   -> 0.0068s
-- add_index(:posts, :listed_publicly)
D, [2020-07-23T14:23:48.472180 #20] DEBUG -- :    (3.3ms)  CREATE  INDEX  "index_posts_on_listed_publicly" ON "posts"  ("listed_publicly")
   -> 0.0064s
== 20190624033659 ReviseSharingData: migrated (0.0254s) =======================
D, [2020-07-23T14:23:48.473629 #20] DEBUG -- :   primary::SchemaMigration Create (0.9ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190624033659"]]
D, [2020-07-23T14:23:48.480112 #20] DEBUG -- :    (6.3ms)  COMMIT
I, [2020-07-23T14:23:48.480178 #20]  INFO -- : Migrating to CreatePrompts (20190704052742)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `unpack1' for nil:NilClass
/app/app/lib/encryptor.rb:8:in `encrypt'
/app/app/models/prompt.rb:9:in `content='
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:50:in `public_send'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:50:in `_assign_attribute'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:43:in `block in _assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:42:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:42:in `_assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/attribute_assignment.rb:21:in `_assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/core.rb:325:in `initialize'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/inheritance.rb:70:in `new'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/inheritance.rb:70:in `new'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/persistence.rb:37:in `create'
/app/db/migrate/20190704054248_seed_prompts.rb:3:in `change'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:828:in `exec_migration'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:811:in `block in migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:810:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1002:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/transactions.rb:212:in `transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1361:in `ddl_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1280:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1229:in `block in migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1229:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1061:in `up'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1036:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/databases.rake:84:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:28:in `run'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:465:in `exec'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Caused by:
NoMethodError: undefined method `unpack1' for nil:NilClass
/app/app/lib/encryptor.rb:8:in `encrypt'
/app/app/models/prompt.rb:9:in `content='
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:50:in `public_send'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:50:in `_assign_attribute'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:43:in `block in _assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:42:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:42:in `_assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/attribute_assignment.rb:21:in `_assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activemodel-6.0.3.2/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/core.rb:325:in `initialize'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/inheritance.rb:70:in `new'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/inheritance.rb:70:in `new'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/persistence.rb:37:in `create'
/app/db/migrate/20190704054248_seed_prompts.rb:3:in `change'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:828:in `exec_migration'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:811:in `block in migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:810:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1002:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/transactions.rb:212:in `transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1361:in `ddl_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1280:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1229:in `block in migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1229:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1061:in `up'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/migration.rb:1036:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/databases.rake:84:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli/exec.rb:28:in `run'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:465:in `exec'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.6.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
== 20190704052742 CreatePrompts: migrating ====================================
-- create_table(:prompts, {})
D, [2020-07-23T14:23:48.481873 #20] DEBUG -- :    (0.8ms)  BEGIN
D, [2020-07-23T14:23:48.490260 #20] DEBUG -- :    (8.2ms)  CREATE TABLE "prompts" ("id" bigserial primary key, "content" bytea NOT NULL, "content_iv" bytea NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
   -> 0.0097s
== 20190704052742 CreatePrompts: migrated (0.0097s) ===========================
D, [2020-07-23T14:23:48.491824 #20] DEBUG -- :   primary::SchemaMigration Create (1.0ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20190704052742"]]
D, [2020-07-23T14:23:48.494257 #20] DEBUG -- :    (2.2ms)  COMMIT
I, [2020-07-23T14:23:48.494321 #20]  INFO -- : Migrating to SeedPrompts (20190704054248)
== 20190704054248 SeedPrompts: migrating ======================================
D, [2020-07-23T14:23:48.498532 #20] DEBUG -- :    (0.9ms)  BEGIN
D, [2020-07-23T14:23:48.513918 #20] DEBUG -- :    (0.9ms)  ROLLBACK
D, [2020-07-23T14:23:48.516092 #20] DEBUG -- :    (1.1ms)  SELECT pg_advisory_unlock(3896631746945074410)

Add docker image to hub.docker.com

Hello
Can you add the docker image to hub.docker.com so you can install it even via the docker management platforms such as casaOS & Portainer.
Thank you

app/bin/docker-run not found error on ubuntu arm

I’m trying to selfhost with my vps that’s running the latest ubuntu(on arm) with docker and the following error keeps on happening
IMG_2621

i’m assuming the bin/docker-run is the file its talking about(never used ruby, limited experience in docker)
Tried changing the entrypoint in dockerfile but that failed as well
+my dockerfile and docker-compose.yml

IMG_2622

IMG_2623

500 error when trying to share a post

Hi, I get a 500 "unexpected error" when trying to share a post, both public and secret.

Here is a pastebin of the error in my console: https://mystb.in/dafafuzoka.coffeescript

I'm running the latest version of journal in Docker, slightly modified since the hub's ruby 3.6 image now targets 3.6.6 instead of 3.6.5 (which is what the build script expects).

Please let me know if you need any more information from me. I'm not at all familiar with Ruby but I'd like to be as helpful as I can anyway :D

issues with docker-compose.yml

Hello!
Thank you for creating this beautiful app :)
I wanted to host a local version of this in my local server and used docker-compose.yml that was in the repo.
It didn't work for me out of the box (Error was /app/bin/docker-run was not found).
I made a few changes (Mainly removed that volume - as I think the built /app was getting overwritten with the mounted volume of /app).
I also had to add a dependency on DB starting first.

If this sounds okay and not an error on my side, I can raise a PR with these changes.
Let me know if that is welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.