lucasdiedrich / ojs

Open Journal Systems (OJS) is a journal management and publishing system.
GNU General Public License v3.0
19 stars 64 forks source link

OJS installed by default or better not? #24

Open marcbria opened 5 years ago

marcbria commented 5 years ago

In last releases, OJS_CLI_INSTALL variable is set to 1 by default. README.md says it's 0.

I'm unsure if need to be 1 or 0 by default... I don't have an strong opinion about this. :-(

With a preinstalled image you don't need to worry about database configuration and you can start playing with the tool in seconds. In the other hand, your site will be installed with default info (insecure) and you will have the blur sensation you missed something. It's nice for developing or demo sites, but not for production.

With a non-installed image you will need to deal with the installation form (set db/usr/pwd/driver correctly), that it's not obvious for newcomers and make repetitive tasks, but you have more control about the process. It's good production, but not for developers.

Probably it's better going conservative here and set it to 0, to avoid facilitate people go to production without changing pwds and so on? It's up to you @lucasdiedrich

I'm thinking here that would be nice a third status... a "demo mode" with a jounral and articles preinstalled. It will be really useful for testing and those who like tot test ojs. If you like the idea I can ask for a "demo" database dump (please, open a new issue to keep things sorted :-D)

Any way, we need to ensure:

If you want a PR, you only need to ask.

lucasdiedrich commented 5 years ago

@marcbria , i think you're confusing the docker image with de compose file, the image by default is 0, the compose file where we need to create an environment for example as quick as possible for the user is set to 1.

Remember that the docker-compose file serves as an example on how to setup the env for the user. So if the variable is not defined over the docker-compose the default will be used, in this case, will be 0.

But yes, i think we need add that variable to the .ENV of the compose file.

The README represents the container, not the docker-compose. I think i'll create and examples folder as quick as i'm able to, because letting the docker-compose in the root of project is going to confuse the users.

What you think?

marcbria commented 5 years ago

i think you're confusing the docker image with de compose file, You are right. I was mixing both. I'm talking about the compose, but the thoughts are still valid. :-)

the compose file where we need to create an environment for example as quick as possible for the user is set to 1. This is what I'm discussing here. I imagine 3 tipical scenarios:

  • developer: (preinstalled) Need a clean OJS, but preinstalled.
  • tester: (demo) Need an OJS with data
  • production: (non-installed) Need a clean OJS to have full control over the site installation

Which of those 3 will be the usual target? Do you want me to ask for a mysqldump and files for a "demo" data?

lucasdiedrich commented 5 years ago

Heres what i think, the three target are the usual usage, but only the tester will need the data to "test" the OJS.

The good thing about the docker-compose is that the developer and the devops (production) will be able to customize the initialization to his own need. So by my opinio we should let OJS_CLI_INSTALL=0 over the Dockfile, and the OJS_CLI_INSTALL=1 over the compose file, because at the docker-compose we're most using this to test or to first bootstrap the project.

For example, i'm working as a sysadmin / devops at my institution, i use this docker-compose only as reference, because i have to re-declare it over my container management infraestructure, and than customize with my own certs, traefik-rules, etc...

I'm sugest to let the things as they are now, and we focus over the PWD for end-user testing purposes. The developer normally has its own data so i don't think we should need the example data for it.

Thanks @marcbria

marcbria commented 5 years ago

You convinced me. And at the end, the default value can be easily overwritten in .ENV :-)

About the demo scenario do you want me to ask for the demo mysqldump and files?

lucasdiedrich commented 5 years ago

@marcbria , if you could ask that it would be great, i'm just testing PWD and now it seems to work, enabling and environment to user test with data would be great.

marcbria commented 5 years ago

if you could ask that it would be great

Ok. Let's keep this issue open to remember.

i'm just testing PWD and now it seems to work

What url? I call it as you pointed in #12 but it's not working to me. :-(

lucasdiedrich commented 5 years ago

Using the URL below: https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/lucasdiedrich/ojs/test/docker-compose.yml

Setup container: image

Acessing through 8080: image

I really doesn't know, but i think we will not be able to setup and PWD with data, but i can test it if i have the data.

marcbria commented 5 years ago

https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/lucasdiedrich/ojs/test/docker-compose.yml It didn't works in my side with firefox and chrome. Containers are build but when I visit the url (even clicking in the link) I see a white screen forever... waiting for the server's answer.

I will dig into this...