This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<openbox_menu xmlns="http://openbox.org/" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://openbox.org/ | |
file:///usr/share/openbox/menu.xsd"> | |
<menu id="root-menu" label="Openbox 3"> | |
<item label="Run Program"> | |
<action name="Execute"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: | |
build: . | |
links: | |
- postgres | |
- elasticsearch | |
- redis | |
ports: | |
- "8000:80" | |
environment: | |
- "ALLOWED_HOSTS=localhost" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: | |
build: . | |
command: dj runserver 0.0.0.0:80 | |
links: | |
- postgres | |
- elasticsearch | |
- redis | |
ports: | |
- "8000:80" | |
volumes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'mysite', | |
'USER': 'mysite', | |
'PASSWORD': '', | |
'HOST': os.environ['POSTGRES_PORT_5432_TCP_ADDR'], | |
'PORT': os.environ['POSTGRES_PORT_5432_TCP_PORT'], | |
'CONN_MAX_AGE': 600, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
http-socket = :80 | |
module = myproject.wsgi | |
chmod-socket = 666 | |
master = true | |
processes = 10 | |
vacuum = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM kaedroho/wagtail-base | |
MAINTAINER Karl Hobley | |
# PIP install uwsgi before adding the code so it's cached (and doesn't rebuild from scratch on every run of docker build) | |
RUN pip install uwsgi | |
# Add the code and cd to it | |
ADD . /usr/local/django/mysite | |
WORKDIR /usr/local/django/mysite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wagtailimages_rendition WHERE image_id || '-' || filter_id IN (SELECT image_id || '-' || filter_id FROM (SELECT image_id, filter_id, COUNT(*) AS count FROM wagtailimages_rendition GROUP BY image_id, filter_id) AS renditions WHERE count > 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# operations.py | |
class Operation(object): | |
def __init__(self, image): | |
self.image = image | |
def get_args(self): | |
return () | |
def apply(self, backend): | |
method = getattr(backend, self.method_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetch media from remote server | |
rsync -avz -e ssh user@host:/path/to/media/ . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
MAINTAINER Karl Hobley | |
# Base packages | |
RUN apt-get update | |
RUN apt-get install -y build-essential | |
RUN apt-get install -y python python-dev python-setuptools | |
RUN apt-get install -y libpq-dev | |
# PIP |