Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore Docker guide from the 'archive' branch #775

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

progval
Copy link
Contributor

@progval progval commented Jun 1, 2020

WIP, as the install in docker is currently broken ( https://pastebin.com/raw/trpk4QC5 )

I also didn't try building it because I don't have the right hugo version on my system

mjankowski and others added 29 commits April 18, 2017 16:32
* Add docker guide from main repo readme

* Add maintenance tasks doc to running section

* Clean up markdown in prod guide

* Move guidance to use tagged releases to docs

* Move local domain and host config to docs repo

* Title of page

* Update Production-guide.md
Updates Docker Update Instructions for git
* Prerequisites and cronjobs

* We probably we don't even support Windows and Mac
This change will help users avoid unnecessary procedure to
complete `bundle install` outside the container.

The explanation

> To generate the PAPERCLIP_SECRET, SECRET_KEY_BASE, and
> OTP_SECRET, you may use:
>
> ```
> rake secret
> ```

gives users a false impression that secrets have to be filled in
before the image can be built. Here, with introduction of CLD3,
completion of `bundle install` became more involved procedure to
prepare tools and libraries as well as higher version of Ruby.
* Mention that we can use prebuilt images.

Instead of building our own.

* Mention that we need to comment out `build`.

If we want to use prebuilt.
this has been out of date for a few months now
* Add how to create VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY

* fix typo
Removed the ssh port forwarding info
* Clarify Docker instructions for prebuilt images

Made clear there are two options for getting the Docker image: pulling the prebuilt image, or building your own. Using a prebuilt image is easier for anyone who hasn't made code changes on their instance.

* Fix errors in Docker prebuilt image instructions
…on#560)

db:setup is used in all guides except Docker Guide, which uses db:migrate
to create the database. db:setup is actually superior over db:migrate for
the purpose in terms of performance and compatibility.

db:setup is performant because it does not perform redundant migrations.
db:migrate, on the other hand, executes migration code which will be
dismissed by later migrations. db:migrate also waits for seconds to allow
to interrupt migrations if it is not favorable to run them on a running
server, but db:setup is obviously executed on a instance which is not
running yet, and the wait is unnecessary.

db:migrate has a compatibility issue. It requires a compatibility layer
to keep it working, and such one may be broken, or not provided by
dependencies such as Paperclip.

This commit replaces db:migrate with db:setup in the building guide. The
procedure cannot be applied to migration from an older release, where
the old procedure could, but it is not problematic because it has
dedicated Updating section.
* Adding copy config step

As discussed in mastodon#591, docker will refuse to run the `mastodon:setup` step without some configuration file present.

* The secret generation part of docker installation process

As noticed in #6883, you need to generate the keys manually.

* Setting correct file owner is important even in the prebuilt-image case

... as evidenced by issue #6911

* This step should not be necessary -- let's fix the installation instead
I've deployed from master and didn't checkout a stable release tag....
@ucodelukas
Copy link

ucodelukas commented Jun 1, 2020

it seems that the db host issue is fixed

-edit:
sometimes it works sometimes not

@ucodelukas
Copy link

the networking is rigged, had to remove it from the docker-compose.yml

@ucodelukas
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.