Skip to content

Add docker-compose for development containers#148

Merged
ArtOfCode- merged 4 commits intocodidact:developfrom
researchapps:add/docker-compose
Aug 26, 2020
Merged

Add docker-compose for development containers#148
ArtOfCode- merged 4 commits intocodidact:developfrom
researchapps:add/docker-compose

Conversation

@vsoch
Copy link
Contributor

@vsoch vsoch commented Aug 25, 2020

This pull request will add a "docker" folder with contents to allow for a dockerized development deployment of QPixel. Notably, this initial version is done for development, and we have two ways to proceed:

  1. discuss how the user can set an environment variable for the docker-compose that would signal production, and also configure email notifications to work, make the changes in this PR so the containers can be deployed for development or production.
  2. instead, have this pull request be to provide a development version of the application, and address the first point when someone explicitly asks for it.

One thing that I was thinking - it would be really useful if there was code to allow for any (or some subset) of config options to be grabbed in the environment. That way, the user could customize anything from the environment in Docker instead of having the check for .dockerenv. Let me know your thoughts!

This will close #70

@vsoch vsoch force-pushed the add/docker-compose branch from 419dd85 to 9f4e7d2 Compare August 25, 2020 20:09
@vsoch
Copy link
Contributor Author

vsoch commented Aug 25, 2020

I added an environment variable to check if the PR is a fork, because it will fail in that case (and I don't think you'd want to try doing some kind of deploying from some rando person submitting a PR?)

password = ENV['COMMUNITY_ADMIN_PASSWORD'] || 'password'
email = ENV['COMMUNITY_ADMIN_EMAIL'] || '[email protected]'

User.create(username: username, password: password, email: email, is_global_admin: true, is_global_moderator: true, staff: true)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason that we can't just set confirmed_at here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried this approach - it didn't work. I'm not sure why, to be honest. But re-thinking it, in the same way that it's required by design, we should also require the user to intentionally issue the command to match that. I wrote the instruction clearly in the docs.

@ArtOfCode- ArtOfCode- merged commit 4e3672f into codidact:develop Aug 26, 2020
@vsoch
Copy link
Contributor Author

vsoch commented Aug 26, 2020

Awesome! Please ping me for any issues or additional needs that might come up. Thanks for all the help! And a question for your team - I wanted to see if I could feature qpixel for the weekly software showcase that I run for the research software encyclopedia? E.g see https://rseng.github.io/rseng/blog/. It’s of particular interest to the research community because I know of several groups trying to create a community like this.

@luap42
Copy link
Member

luap42 commented Aug 26, 2020

That sounds great. Thanks for your work on this PR.

@vsoch
Copy link
Contributor Author

vsoch commented Aug 26, 2020

Awesome! Are there any docs about background / history of the project, pictures, or anything in particular you'd like me to share? If not, I'll come up with my best effort for an introduction, rationale, and then sharing various links/ideas (akin to the others).

@luap42
Copy link
Member

luap42 commented Aug 26, 2020

@vsoch are you on our dev chat server? If yes, ping me. If not, go to here, join and then ping me. :D

@cellio
Copy link
Member

cellio commented Aug 26, 2020

Sharing with the research science encyclopedia sounds great, thanks! If you haven't seen our high-level vision yet, please take a look at https://meta.codidact.com/articles/276296. It's about where we're headed, not so much where we came from; I don't know if the latter is stated clearly anywhere.

(Basically: unhappy users and moderators on Stack Exchange set out to build an alternative, then realized that communities are more than Q&A and we needed to think bigger. The focus is not on duplicating or competing with SE; SE was just the catalyst. By building a new thing we have the opportunity to apply lessons learned over the years on other platforms.)

Or, I now see the comment from luap42 -- do that. :-)

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.

Docker (Compose) deployment options?

4 participants