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

Dockerfile/docker-compose fixes #407

Merged
merged 2 commits into from Dec 8, 2020
Merged

Conversation

conor-f
Copy link
Contributor

@conor-f conor-f commented Oct 26, 2020

I recently tried to install writefreely using my docker-compose setup that I use for managing all self hosted services I'm running. It took a lot of work to get the docker-compose setup working for writefreely but this PR should make things significantly easier.

This is the workflow of this PR to install writefreely with docker-compose:

  • Take the docker-compose.yml that is modified in this PR, and put it in a directory.
  • Run:
touch config.ini
sudo chown root:root config.ini
sudo chmod 777 config.ini
- Note that this is definitely not the right thing to do and permissions could certainly be tighter. If anyone has suggestions for me I'm more than willing to update this PR.
  • Then this sequence of commands:
sudo docker-compose up -d writefreely-db
sudo docker-compose run writefreely-web --config
sudo docker-compose run writefreely-web --gen-keys
vim config.ini <-- Only needed if you want to make other modifications
sudo docker-compose up -d writefreely-web

I know this is kind of messy still but this is working now so let me know any changes you'd like to see to get this merged. This should (mostly) solve #139 #323 and #357


  • I have signed the CLA

Updates versions and uses maria DB instead of sqlite in the
docker-compose. Also fixes things related to networks, generating
config, etc.
@conor-f
Copy link
Contributor Author

conor-f commented Nov 15, 2020

Any review on this? Happy to modify it as necessary

@thebaer
Copy link
Member

thebaer commented Nov 16, 2020

Thanks for submitting this, @conor-f! It would be great to get these Docker issues fixed.

I won't be able to help much since this isn't my area of expertise, but maybe @shleeable or @kaiyou could review?

@finn-ball
Copy link

I just ran into the same issue. Changes look good to me.

@finn-ball
Copy link

Though I would make one suggestion, wouldn't it be easier to have a simple sqlite example instead of spinning up a mariadb image too?

@thebaer
Copy link
Member

thebaer commented Dec 7, 2020

Thanks for taking a look, @finn-ball!

Just to be sure @conor-f, which issues in particular should be completely closed when we merge this?

@conor-f
Copy link
Contributor Author

conor-f commented Dec 8, 2020

I would close the two issues and one PR I linked in the original comment.

There are improvements that could be made to this, but this PR will allow people to just pull the docker-compose.yml and get a working instance with significantly less hardship.

@thebaer
Copy link
Member

thebaer commented Dec 8, 2020

Perfect, that'll work! Merging this now.

This was linked to issues Dec 8, 2020
@thebaer thebaer merged commit 53ea85d into writefreely:develop Dec 8, 2020
@thebaer thebaer mentioned this pull request Dec 8, 2020
1 task
@zem
Copy link

zem commented Dec 16, 2020

@conor-f: please update the pr to do a

sudo chmod 644 config.ini 

It should work with 644, that should be enough for the writefreely process to access.

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

Successfully merging this pull request may close these issues.

Docker refactor Docker issue
4 participants