Skip to content

Instantly share code, notes, and snippets.

View andyklimczak's full-sized avatar
Cache Rules Everything Around Me (C.R.E.A.M.)

Andy Klimczak andyklimczak

Cache Rules Everything Around Me (C.R.E.A.M.)
View GitHub Profile

Don't want to run seafile on port 80, so changing the port to 8000 requires changing some other settings.

Using this docker-compose.yml

    image: mariadb:10.11
    container_name: seafile-mysql
      - MYSQL_ROOT_PASSWORD=db_dev  # Requested, set the root's password of MySQL service.
andyklimczak / gist:6cffb26bf86611ccd86c41e0ec8b5765
Created September 8, 2023 21:37
How to access dokku postgres psql
dokku postgres:list
dokku postgres:info DBNAME
copy the DSN, something like postgres://postgres:password123@dokku-postgres-DBNAME:5432/db_name
dokku postgres:enter DBNAME
then inside the postgres container:
psql DSN
BUT CHANGE THE HOST NAME to localhost in DSN, so it should be something like postgres://postgres:password123@localhost:5432/db_name

ssh in (typically ubuntu digital ocean dokku marketplace image)

$ ssh host

Create user other than root to log in to with sudo and dokku groups

# adduser somename
# usermod -aG sudo somename
# usermod -aG dokku somename
andyklimczak / gist:ba8694dfeaffb3546e89ea5cb92040de
Last active May 22, 2023 12:46
Elixir Phoenix Cheatsheet

Add index to field:

create table(:posts) do
  add :rating, :integer

create index(:posts, [:rating])