clean up refresg commands and start on docker-compose files for stage

This commit is contained in:
Oly 2017-02-01 14:01:50 +00:00
parent 6fd4a64972
commit 411dedf00d
6 changed files with 32 additions and 28 deletions

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
python /app/manage.py collectstatic --noinput python /app/manage.py collectstatic --noinput
/usr/local/bin/gunicorn config.wsgi -w 4 -b 0.0.0.0:5000 --chdir=/app /usr/local/bin/gunicorn config.wsgi -w 4 -b unix:/data/sockets/gunicorn.sock --chdir=/app

View File

@ -4,6 +4,6 @@ ADD nginx.conf /etc/nginx/nginx.conf
ADD start.sh /start.sh ADD start.sh /start.sh
ADD nginx-secure.conf /etc/nginx/nginx-secure.conf ADD nginx-secure.conf /etc/nginx/nginx-secure.conf
ADD dhparams.pem /etc/ssl/private/dhparams.pem #ADD dhparams.pem /etc/ssl/private/dhparams.pem
CMD /start.sh CMD /start.sh

View File

@ -1,6 +1,7 @@
version: '2' version: '2'
volumes: volumes:
gunicorn_socket: {}
postgres_data: {} postgres_data: {}
postgres_backup: {} postgres_backup: {}
@ -22,20 +23,20 @@ services:
- redis - redis
command: /gunicorn.sh command: /gunicorn.sh
env_file: .env env_file: .env
volumes:
- .:/app
- gunicorn_socket:/data/sockets/
# nginx: nginx:
# build: ./compose/nginx build: ./compose/nginx
# depends_on: depends_on:
# - django - django
# - certbot # - certbot
# ports: environment:
# - "0.0.0.0:80:80" - MY_DOMAIN_NAME=maidstone-hackspace.org.uk
ports:
# environment: - "0.0.0.0:80:80"
# - MY_DOMAIN_NAME=maidstone-hackspace.org.uk
# ports:
# - "0.0.0.0:80:80"
# - "0.0.0.0:443:443" # - "0.0.0.0:443:443"
# volumes: # volumes:
# - /etc/letsencrypt:/etc/letsencrypt # - /etc/letsencrypt:/etc/letsencrypt

View File

@ -33,12 +33,12 @@ class Command(BaseCommand):
self.stdout.write(sub.get('status')) self.stdout.write(sub.get('status'))
subscriptions.append( subscriptions.append(
Membership( Membership(
user= user_model, user=user_model,
email= sub.get('email'), email=sub.get('email'),
reference= sub.get('reference'), reference=sub.get('reference'),
payment= 10.00, payment=10.00,
# 'date'= sub.get('start_date'), date= sub.get('start_date'),
date=timezone.now(), # date=timezone.now(),
status=Membership.lookup_status(name=sub.get('status')) status=Membership.lookup_status(name=sub.get('status'))
) )
) )

View File

@ -24,7 +24,6 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<img src="{{ user.image.profile.url }}" alt="Profile image"/> <img src="{{ user.image.profile.url }}" alt="Profile image"/>
<p>{{ user.username }}</p> <p>{{ user.username }}</p>
<p>{{ user.name }}</p> <p>{{ user.name }}</p>
<p>{{ user.email }}</p> <p>{{ user.email }}</p>
@ -32,11 +31,15 @@
<p>Member since</p> <p>Member since</p>
<p>Description: {{ blurb.description }}</p> <p>Description: {{ blurb.description }}</p>
<p>Skills: {{ blurb.description }}</p> <p>Skills: {{ blurb.description }}</p>
<h3>Membership status</h3>
<p>Membership Status: {{ membership.get_status }}</p> <p>Membership Status: {{ membership.get_status }}</p>
<p>Last Payment: {{membership.date}}</p>
<p>Amount: &pound;{{membership.payment}}</p>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div id="membercard" class="registered"> <div id="membercard" class="registered">
<div class="date">Joined {{membership.start_date}}</div> <div class="date">Joined {{membership.date}}</div>
<div class="container"> <div class="container">
<div class="middle"> <div class="middle">
<p>MHS{{ user.id|stringformat:"05d" }}</p><p>{{user.name}}{{user.last_name}}</p> <p>MHS{{ user.id|stringformat:"05d" }}</p><p>{{user.name}}{{user.last_name}}</p>

View File

@ -36,8 +36,8 @@ class Blurb(models.Model):
MEMBERSHIP_STRING = { MEMBERSHIP_STRING = {
0: 'Non Member', 0: 'Guest user',
1: 'Member', 1: 'Active membership',
3: 'Membership Expired' 3: 'Membership Expired'
} }