Skip to content

Commit

Permalink
Merge remote-tracking branch 'chipy/master' into feature/other-meetings
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeJasinski committed Jul 17, 2017
2 parents 82ae075 + a8bbf63 commit fc2bd57
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 10 deletions.
92 changes: 92 additions & 0 deletions GETTING_STARTED_WITH_DOCKER.md
@@ -0,0 +1,92 @@
=========
Getting Started with Docker for Local Development:
============

To get setup with chipy.org code using Docker it is recommended that you use the following:

* Docker
* virtualenv

Setting up a Local environment
------------------------------

Create a virtual environment where your dependencies will live::

$ virtualenv venv
$ source venv/bin/activate

Clone the repo

git clone git://github.com/chicagopython/chipy.org.git chipy.org

Make the project directory your working directory::

cd chipy.org

Install project dependencies::

pip install -r requirements.txt

Start [a docker instance for Postgres](https://hub.docker.com/_/postgres/):

docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres

Connect to the instance and set up a `chipy` database:

docker run -it --rm --link some-postgres:postgres postgres psql -h postgres -U postgres
> create database chipy;

Create an env file in the root directory:

export DEBUG=True
export ALLOWED_HOSTS="chipy.org,www.chipy.org"
export GITHUB_APP_ID=youridhere
export GITHUB_API_SECRET=supersecretkeyhere
export SECRET_KEY=somesecretkeyfordjangogoeshere
export ADMINS=admin@example.com
export ENVELOPE_EMAIL_RECIPIENTS=admin@example.com
export NORECAPTCHA_SITE_KEY=your_recaptcha_public_key
export NORECAPTCHA_SECRET_KEY=your_recaptcha_private_key
export DATABASE_URL=postgres://postgres:mysecretpassword@localhost:5432/chipy

# settings needed for social authentication
export GITHUB_API_SECRET=""
export GITHUB_APP_ID=""
export GOOGLE_OAUTH2_CLIENT_ID=""
export GOOGLE_OAUTH2_CLIENT_SECRET=""

# optional email settings and their defaults
export EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
export EMAIL_HOST='smtp.sendgrid.net'
export EMAIL_PORT=587
export EMAIL_USE_TLS=True
export EMAIL_HOST_USER=""
export EMAIL_HOST_PASSWORD=""

# to enable S3, do the following
export USE_S3="True"
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export AWS_STORAGE_BUCKET_NAME=""

Source your env:

source .env

Note that the only required config is the github stuff. The secret key will be random by default which will cause your session to wipe on every restart.


Migrate the database to build your :

# first time (this command notoriously throws errors, don't panic)
python manage.py migrate auth

# after future migrations
python manage.py makemigrations
python manage.py makemigrations

Now you can run the server!

(venv)$ python manage.py runserver

Happy Dev'ing!
1 change: 0 additions & 1 deletion README.md
@@ -1,4 +1,3 @@
=========
Chipy.org
=========

Expand Down
14 changes: 14 additions & 0 deletions chipy_org/static/icons/slack-square-social-media.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions chipy_org/templates/homepage.html
Expand Up @@ -35,8 +35,8 @@
background-image: url('/static/icons/github-square-social-media.svg');
}

#icon-mail {
background-image: url('/static/icons/mail-square-social-media.svg');
#icon-slack {
background-image: url('/static/icons/slack-square-social-media.svg');
}

#icon-twitter {
Expand Down Expand Up @@ -333,7 +333,7 @@ <h4 itemprop="name">{{ meeting.meeting_type.name }}</h4>

<div class="row-fluid">
<div class="module span3"><a id="icon-github" class="icon box-button" href="https://github.com/chicagopython/chipy.org"></a></div>
<div class="module span3"><a id="icon-mail" class="icon box-button" href="https://mail.python.org/mailman/listinfo/chicago"></a></div>
<div class="module span3"><a id="icon-slack" class="icon box-button" href="https://joinchipyslack.herokuapp.com/"></a></div>
<div class="module span3"><a id="icon-meetup" class="icon box-button" href="https://www.meetup.com/_ChiPy_/"></a></div>
<div class="module span3"><a id="icon-twitter" class="icon box-button" href="https://twitter.com/chicagopython"></a></div>
</div>
Expand All @@ -342,10 +342,11 @@ <h4 itemprop="name">{{ meeting.meeting_type.name }}</h4>
<section>
<div class="row-fluid">
<div class="module span6">

<h3>Slack</h3>
<p>
ChiPy has an official <a href="https://chipy.slack.com">Slack group</a>.
</p>
<p>We're on slack! Join a room, ask questions, make friends!</p>
<p><a class="btn" href="https://joinchipyslack.herokuapp.com/">Join the Conversation &raquo;</a></p>

<h3>IRC</h3>
<p>Some of us like to hang out in the IRC #chipy channel on irc.freenode.net</p>
<p><a class="btn" href="irc://irc.freenode.net/chipy">Start chatting &raquo;</a></p>
Expand All @@ -354,8 +355,11 @@ <h3>Mailing List</h3>
<p><a class="btn" href="http://mail.python.org/mailman/listinfo/chicago">Sign up &raquo;</a></p>
</div>
<div class="module span6">
<a class="twitter-timeline" href="https://twitter.com/search?q=%40ChicagoPython+%23ChiPy" data-widget-id="426812787017281536">Tweets about "@brianray #ChiPy"</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<h3>Twitter</h3>
<p>Follow Us On Twitter! Get the latest tweets in your feed.</p>
<p><a class="btn" href="https://twitter.com/ChicagoPython">@ChicagoPython &raquo;</a></p>
<a class="twitter-timeline" data-chrome="noheader" data-height=600 href="https://twitter.com/ChicagoPython">Tweets by ChicagoPython</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div><!--/span-->
</div><!-- #row-fluid -->
</section>
Expand Down
2 changes: 1 addition & 1 deletion chipy_org/templates/site_base.html
Expand Up @@ -36,7 +36,7 @@
<li><a href="/pages/host/">Host</a></li>
<li><a href="/pages/referrals/">Referrals</a></li>
<li><a href="/pages/donate/">Donate</a></li>
<li><a href="{% url 'propose_topic' %}">Present</a></li>
<li><a href="{% url 'propose_topic' %}">Speak</a></li>
<li><a href="{% url 'profiles:list' %}">Members</a></li>
<li><a href="http://www.chipymentor.org/">Mentorship</a></li>
<li><a href="/pages/sigs/">SIGs</a></li>
Expand Down

0 comments on commit fc2bd57

Please sign in to comment.