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

Allow data directories outside pwd #333

Merged
merged 4 commits into from
Jan 2, 2020

Conversation

mangelajo
Copy link
Contributor

Running ponzu-cms inside a docker container, and maintaining
data files in a volume (or several) was not possible with the
previous directory schema without copying files or binaries
to the volume.

This commit adds several environment variables to allow the
administrator to specify paths for directories while
retaining backwards compatibility.

  • PONZU_DATA_DIR : is the directory where all the data and other
    directories will be stored, still the other
    directories can be controlled by the other env
    variables.

  • PONZU_TLS_DIR : is the directory to store devcerts and autocerts

  • PONZU_ADMINSTATIC_DIR : directory where the admin static files are
    served from.

  • PONZU_UPLOAD_DIR: upload files directory

  • PONZU_SEARCH_DIR: index directory for searches

@mangelajo
Copy link
Contributor Author

@nilslice let me know if this looks ok, just trying to make deployment more flexible while retaining backwards compatibility.

@nilslice
Copy link
Contributor

great idea - will take a closer look tonight. thank you!

Running ponzu-cms inside a docker container, and maintaining
data files in a volume (or several) was not possible with the
previous directory schema without copying files or binaries
to the volume.

This commit adds several environment variables to allow the
administrator to specify paths for directories while
retaining backwards compatibility.

- PONZU_DATA_DIR : is the directory where all the data and other
                   directories will be stored, still the other
                   directories can be controlled by the other env
                   variables.

- PONZU_TLS_DIR : is the directory to store devcerts and autocerts

- PONZU_ADMINSTATIC_DIR : directory where the admin static files are
                          served from.

- PONZU_UPLOAD_DIR: upload files directory

- PONZU_SEARCH_DIR: index directory for searches
@mangelajo
Copy link
Contributor Author

mangelajo commented Dec 30, 2019

I made a few corrections and it’s now deployed on https://cms.music.madrid on top of a small k8s instance. I will send another PR with instructions to build and deploy on top of k8s

@mangelajo
Copy link
Contributor Author

mangelajo commented Dec 31, 2019

@nilslice is there a way to upload images via the json API?, optionally I can post to the admin/edit endpoint I guess.

Oh I see there is the fileKeys in Create method of the go-client. Now I need to figure out how to use it.

@nilslice nilslice self-requested a review January 2, 2020 00:12
Copy link
Contributor

@nilslice nilslice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will eventually want to add these vars to the docs at https://github.com/ponzu-cms/docs

Thanks!

@nilslice nilslice merged commit 9bc41b7 into ponzu-cms:master Jan 2, 2020
@mangelajo
Copy link
Contributor Author

Hey thanks @nilslice for adding me to the org :-), I'm happy to help!,

Do you want any help setting up CI with travis?, I have some experience with other projects. I see you were experimenting with circleCI I have no experience with them, but if you picked it because you believe it may work better I can have a look at that, if you have no preference I can do it quickly with travis.

@mangelajo
Copy link
Contributor Author

btw I tried to join the slack, but it registration is closed, how can I get an invite?

@nilslice
Copy link
Contributor

nilslice commented Jan 3, 2020

@mangelajo - I sent you an email invite through Slack.. used the email in your git commit (redhat) hope that's OK..

Do you want any help setting up CI with travis?,

Sure! I'm not tied to CircleCI at all.. I just have lost the time to really stay on top of this project's maintenance requirements, and CI is a pretty important part. Thanks for your help.

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.

2 participants