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

mangelajo commented Dec 29, 2019

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

This comment has been minimized.

Copy link
Contributor Author

mangelajo commented Dec 29, 2019

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

@nilslice

This comment has been minimized.

Copy link
Member

nilslice commented Dec 29, 2019

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 mangelajo force-pushed the mangelajo:env-vars-for-dirs branch from cf71852 to 90a2ff9 Dec 29, 2019
@mangelajo mangelajo force-pushed the mangelajo:env-vars-for-dirs branch from 980f8f3 to 12ebea0 Dec 29, 2019
@mangelajo mangelajo force-pushed the mangelajo:env-vars-for-dirs branch from 12ebea0 to 2469ec0 Dec 29, 2019
@mangelajo

This comment has been minimized.

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

This comment has been minimized.

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 Jan 2, 2020
Copy link
Member

nilslice left a comment

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

This comment has been minimized.

Copy link
Contributor Author

mangelajo commented Jan 3, 2020

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

This comment has been minimized.

Copy link
Contributor Author

mangelajo commented Jan 3, 2020

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

@nilslice

This comment has been minimized.

Copy link
Member

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
Projects
None yet
2 participants
You can’t perform that action at this time.