Skip to content

Instantly share code, notes, and snippets.

@adelevie
Created March 18, 2016 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelevie/9da653edf637e0321dda to your computer and use it in GitHub Desktop.
Save adelevie/9da653edf637e0321dda to your computer and use it in GitHub Desktop.
Last login: Fri Mar 18 17:47:06 on ttys007
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine create -d virtualbox --virtualbox-import-boot2docker-vm boot2docker-vm docker-vm
Running pre-create checks...
Creating machine...
(docker-vm) Copying /Users/alandelevie/.docker/machine/cache/boot2docker.iso to /Users/alandelevie/.docker/machine/machines/docker-vm/boot2docker.iso...
(docker-vm) Creating VirtualBox VM...
(docker-vm) Starting the VM...
(docker-vm) Check network to re-create if needed...
(docker-vm) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env docker-vm
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose build tock
Building tock
^CERROR: Aborting.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up
ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine start default
Starting "default"...
Machine "default" is already running.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Running tcp://192.168.99.100:2376 v1.10.3
dev - virtualbox Running tcp://192.168.99.101:2376 Unknown Unable to query docker version: Unable to read TLS config: open : no such file or directory
docker-vm - virtualbox Running tcp://192.168.99.102:2376 v1.10.3
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine
Usage: docker-machine [OPTIONS] COMMAND [arg...]
Create and manage machines running Docker.
Version: 0.6.0, build e27fb87
Author:
Docker Machine Contributors - <https://github.com/docker/machine>
Options:
--debug, -D Enable debug mode
-s, --storage-path "/Users/alandelevie/.docker/machine" Configures storage path [$MACHINE_STORAGE_PATH]
--tls-ca-cert CA to verify remotes against [$MACHINE_TLS_CA_CERT]
--tls-ca-key Private key to generate certificates [$MACHINE_TLS_CA_KEY]
--tls-client-cert Client cert to use for TLS [$MACHINE_TLS_CLIENT_CERT]
--tls-client-key Private key used in client TLS auth [$MACHINE_TLS_CLIENT_KEY]
--github-api-token Token to use for requests to the Github API [$MACHINE_GITHUB_API_TOKEN]
--native-ssh Use the native (Go-based) SSH implementation. [$MACHINE_NATIVE_SSH]
--bugsnag-api-token BugSnag API token for crash reporting [$MACHINE_BUGSNAG_API_TOKEN]
--help, -h show help
--version, -v print the version
Commands:
active Print which machine is active
config Print the connection config for machine
create Create a machine
env Display the commands to set up the environment for the Docker client
inspect Inspect information about a machine
ip Get the IP address of a machine
kill Kill a machine
ls List machines
provision Re-provision existing machines
regenerate-certs Regenerate TLS Certificates for a machine
restart Restart a machine
rm Remove a machine
ssh Log into or run a command on a machine with SSH.
scp Copy files between machines
start Start a machine
status Get the status of a machine
stop Stop a machine
upgrade Upgrade a machine to the latest version of Docker
url Get the URL of a machine
version Show the Docker Machine version or a machine docker version
help Shows a list of commands or help for one command
Run 'docker-machine COMMAND --help' for more information on a command.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine kill default
Killing "default"...
Machine "default" was killed.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine start default
Starting "default"...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Machine "default" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/alandelevie/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $(docker-machine env)
➜ tock git:(CivicVision-328-docker-compose-setup) eval $(docker-machine env)
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose build tock
Building tock
Step 1 : FROM python:3.4
3.4: Pulling from library/python
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
0f35d0fe50cc: Pull complete
627b6479c8f7: Pull complete
67c44324f4e3: Pull complete
9ee7e6ec2a05: Pull complete
bbaa314a5925: Pull complete
629f63939484: Pull complete
Digest: sha256:e93391f3bd9683adedee8c19b22fe10a52e43975c2dfdd3c26e97b07d9a0e177
Status: Downloaded newer image for python:3.4
---> 85bfa05f5c49
Step 2 : MAINTAINER Mila Frerichs mila@civicvision.de
---> Running in 8dab94913453
---> 20e109e2708a
Removing intermediate container 8dab94913453
Step 3 : RUN mkdir /tock
---> Running in f9bcbd2f73ab
---> e9965f96130f
Removing intermediate container f9bcbd2f73ab
Step 4 : WORKDIR /tock
---> Running in b3f6e80f7316
---> 82f0144284be
Removing intermediate container b3f6e80f7316
Step 5 : COPY requirements.txt /tock
---> 64d2b4a4f19f
Removing intermediate container 1afc21be4637
Step 6 : COPY requirements-dev.txt /tock
---> 14f8bada747d
Removing intermediate container 8b10971ab6e5
Step 7 : RUN pip install -r requirements.txt
---> Running in 7937699b70c3
Collecting Django==1.8.9 (from -r requirements.txt (line 1))
Downloading Django-1.8.9-py2.py3-none-any.whl (6.2MB)
Collecting dj-database-url==0.3.0 (from -r requirements.txt (line 2))
Downloading dj_database_url-0.3.0-py2.py3-none-any.whl
Collecting psycopg2==2.6 (from -r requirements.txt (line 3))
Downloading psycopg2-2.6.tar.gz (367kB)
Collecting model-mommy==1.2.3 (from -r requirements.txt (line 4))
Downloading model_mommy-1.2.3.tar.gz
Collecting waitress==0.8.9 (from -r requirements.txt (line 5))
Downloading waitress-0.8.9.tar.gz (121kB)
Collecting whitenoise==1.0.6 (from -r requirements.txt (line 6))
Downloading whitenoise-1.0.6-py2.py3-none-any.whl
Collecting djangorestframework==3.1.2 (from -r requirements.txt (line 7))
Downloading djangorestframework-3.1.2-py2.py3-none-any.whl (463kB)
Collecting djangorestframework-csv==1.3.3 (from -r requirements.txt (line 8))
Downloading djangorestframework-csv-1.3.3.tar.gz
Collecting bleach==1.4.2 (from -r requirements.txt (line 9))
Downloading bleach-1.4.2-py2.py3-none-any.whl
Collecting six (from model-mommy==1.2.3->-r requirements.txt (line 4))
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.4/site-packages (from waitress==0.8.9->-r requirements.txt (line 5))
Collecting html5lib>=0.999 (from bleach==1.4.2->-r requirements.txt (line 9))
Downloading html5lib-0.9999999.tar.gz (889kB)
Installing collected packages: Django, dj-database-url, psycopg2, six, model-mommy, waitress, whitenoise, djangorestframework, djangorestframework-csv, html5lib, bleach
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'done'
Running setup.py install for model-mommy: started
Running setup.py install for model-mommy: finished with status 'done'
Running setup.py install for waitress: started
Running setup.py install for waitress: finished with status 'done'
Running setup.py install for djangorestframework-csv: started
Running setup.py install for djangorestframework-csv: finished with status 'done'
Running setup.py install for html5lib: started
Running setup.py install for html5lib: finished with status 'done'
Successfully installed Django-1.8.9 bleach-1.4.2 dj-database-url-0.3.0 djangorestframework-3.1.2 djangorestframework-csv-1.3.3 html5lib-0.9999999 model-mommy-1.2.3 psycopg2-2.6 six-1.10.0 waitress-0.8.9 whitenoise-1.0.6
You are using pip version 8.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---> 84fe8aa2a3db
Removing intermediate container 7937699b70c3
Step 8 : RUN pip install -r requirements-dev.txt
---> Running in 2ed942ec02d9
Collecting coverage (from -r requirements-dev.txt (line 1))
Downloading coverage-4.0.3.tar.gz (354kB)
Collecting django-debug-toolbar (from -r requirements-dev.txt (line 2))
Downloading django_debug_toolbar-1.4-py2.py3-none-any.whl (212kB)
Collecting django-webtest (from -r requirements-dev.txt (line 3))
Downloading django_webtest-1.7.8-py2.py3-none-any.whl
Collecting factory-boy (from -r requirements-dev.txt (line 4))
Downloading factory_boy-2.6.1-py2.py3-none-any.whl
Collecting nplusone (from -r requirements-dev.txt (line 5))
Downloading nplusone-0.6.1-py2.py3-none-any.whl
Collecting sqlparse (from django-debug-toolbar->-r requirements-dev.txt (line 2))
Downloading sqlparse-0.1.19.tar.gz (58kB)
Requirement already satisfied (use --upgrade to upgrade): Django>=1.7 in /usr/local/lib/python3.4/site-packages (from django-debug-toolbar->-r requirements-dev.txt (line 2))
Collecting webtest>=1.3.3 (from django-webtest->-r requirements-dev.txt (line 3))
Downloading WebTest-2.0.20.tar.gz (66kB)
Collecting fake-factory>=0.5.0 (from factory-boy->-r requirements-dev.txt (line 4))
Downloading fake_factory-0.5.7-py2.py3-none-any.whl (484kB)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/local/lib/python3.4/site-packages (from nplusone->-r requirements-dev.txt (line 5))
Collecting blinker>=1.3 (from nplusone->-r requirements-dev.txt (line 5))
Downloading blinker-1.4.tar.gz (111kB)
Collecting WebOb>=1.2 (from webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Downloading WebOb-1.6.0-py2.py3-none-any.whl (77kB)
Requirement already satisfied (use --upgrade to upgrade): waitress>=0.8.5 in /usr/local/lib/python3.4/site-packages (from webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Collecting beautifulsoup4 (from webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Downloading beautifulsoup4-4.4.1-py3-none-any.whl (81kB)
Collecting python-dateutil>=2.4 (from fake-factory>=0.5.0->factory-boy->-r requirements-dev.txt (line 4))
Downloading python_dateutil-2.5.1-py2.py3-none-any.whl (200kB)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.4/site-packages (from waitress>=0.8.5->webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Installing collected packages: coverage, sqlparse, django-debug-toolbar, WebOb, beautifulsoup4, webtest, django-webtest, python-dateutil, fake-factory, factory-boy, blinker, nplusone
Running setup.py install for coverage: started
Running setup.py install for coverage: finished with status 'done'
Running setup.py install for sqlparse: started
Running setup.py install for sqlparse: finished with status 'done'
Running setup.py install for webtest: started
Running setup.py install for webtest: finished with status 'done'
Running setup.py install for blinker: started
Running setup.py install for blinker: finished with status 'done'
Successfully installed WebOb-1.6.0 beautifulsoup4-4.4.1 blinker-1.4 coverage-4.0.3 django-debug-toolbar-1.4 django-webtest-1.7.8 factory-boy-2.6.1 fake-factory-0.5.7 nplusone-0.6.1 python-dateutil-2.5.1 sqlparse-0.1.19 webtest-2.0.20
You are using pip version 8.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---> 2e4e2d1b7520
Removing intermediate container 2ed942ec02d9
Step 9 : COPY tock /tock
---> ceabe457ba30
Removing intermediate container 5e0496dbf7c8
Step 10 : EXPOSE 4001
---> Running in 6d11c20b91ca
---> be710aa3b796
Removing intermediate container 6d11c20b91ca
Step 11 : CMD waitress-serve --port=4001 tock.wsgi:application
---> Running in 725d01e32e20
---> d49397811187
Removing intermediate container 725d01e32e20
Successfully built d49397811187
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-migrate.sh
Creating network "tock_default" with the default driver
Pulling db (postgres:latest)...
latest: Pulling from library/postgres
fdd5d7827f33: Already exists
a3ed95caeb02: Pull complete
beb59dc2ad34: Pull complete
f42a5322ef13: Pull complete
f6719ae287c6: Pull complete
0dc08677d778: Pull complete
5f3b03c1dd66: Pull complete
4d4c6707d860: Pull complete
11f8efebbb9b: Pull complete
edefda034373: Pull complete
5fe4bba523f0: Pull complete
a2d55eea3342: Pull complete
Digest: sha256:bf1d7cbeb86b76f4c0991061515ebb13c6b57a9588a92f795eaebaede1c3657b
Status: Downloaded newer image for postgres:latest
Creating tock_db_1
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "db" (172.18.0.2) and accepting
TCP/IP connections on port 5432?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 19, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/executor.py", line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 47, in __init__
self.build_graph()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 191, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 162, in cursor
cursor = self.make_debug_cursor(self._cursor())
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 135, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.4/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host "db" (172.18.0.2) and accepting
TCP/IP connections on port 5432?
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-migrate.sh
Operations to perform:
Synchronize unmigrated apps: tock, api, staticfiles, messages, debug_toolbar
Apply all migrations: projects, admin, contenttypes, auth, sessions, employees, hours
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying employees.0001_initial... OK
Applying employees.0002_auto_20150429_1851... OK
Applying employees.0003_auto_20150430_1815... OK
Applying employees.0004_employee... OK
Applying employees.0005_delete_employee... OK
Applying employees.0006_userdata_current_employee... OK
Applying projects.0001_initial... OK
Applying hours.0001_initial... OK
Applying hours.0002_auto_20150405_0317... OK
Applying hours.0003_auto_20150408_1934... OK
Applying hours.0004_auto_20150408_1934... OK
Applying hours.0005_auto_20150413_1839... OK
Applying hours.0006_auto_20150428_0150... OK
Applying hours.0007_reportingperiod_message... OK
Applying hours.0008_auto_20150514_1651... OK
Applying hours.0009_remove_timecardobject_time_percentage... OK
Applying hours.0010_auto_20150519_1436... OK
Applying hours.0011_auto_20151203_1532... OK
Applying hours.0012_auto_20151224_1625... OK
Applying hours.0013_timecardobject_notes... OK
Applying hours.0014_timecard_submitted... OK
Applying projects.0002_auto_20151020_2043... OK
Applying projects.0003_auto_20151103_2041... OK
Applying projects.0004_remove_project_priority... OK
Applying projects.0005_project_mbnumber... OK
Applying projects.0006_auto_20151229_1618... OK
Applying projects.0007_auto_20160310_0136... OK
Applying sessions.0001_initial... OK
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-migrate.shscripts/docker-seed.sh
zsh: no such file or directory: scripts/docker-migrate.shscripts/docker-seed.sh
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-seed.sh
Installed 15891 object(s) from 1 fixture(s)
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-test.sh
ERROR: syntax error at or near "NOT"
LINE 1: CREATE DATABASE IF NOT EXISTS "tock-test"
^
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL: database "tock-test" does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 19, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/commands/syncdb.py", line 25, in handle
call_command("migrate", **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 120, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/executor.py", line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 47, in __init__
self.build_graph()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 191, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 164, in cursor
cursor = self.make_cursor(self._cursor())
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 135, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.4/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: FATAL: database "tock-test" does not exist
/usr/local/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system.
return f(*args, **kwds)
Creating test database for alias 'default'...
..........................................................................................
----------------------------------------------------------------------
Ran 90 tests in 5.154s
OK
Destroying test database for alias 'default'...
Name Stmts Miss Cover Missing
-----------------------------------------------------------------------------
api/__init__.py 0 0 100%
api/admin.py 1 0 100%
api/models.py 1 0 100%
api/renderers.py 27 1 96% 55
api/urls.py 3 0 100%
api/views.py 158 1 99% 199
employees/__init__.py 0 0 100%
employees/admin.py 0 0 100%
employees/forms.py 15 0 100%
employees/models.py 7 0 100%
employees/urls.py 3 0 100%
employees/views.py 50 0 100%
hours/__init__.py 0 0 100%
hours/admin.py 41 17 59% 15-17, 20, 29-49
hours/factories.py 27 0 100%
hours/forms.py 94 4 96% 64, 67, 134-135
hours/models.py 47 1 98% 80
hours/templatetags/__init__.py 0 0 100%
hours/templatetags/has_submitted_timesheet.py 5 0 100%
hours/urls/__init__.py 0 0 100%
hours/urls/reports.py 3 0 100%
hours/urls/timesheets.py 3 0 100%
hours/utils.py 7 0 100%
hours/views.py 141 32 77% 78-114, 117, 163-171, 176-185, 201, 289
projects/__init__.py 0 0 100%
projects/admin.py 11 0 100%
projects/factories.py 16 0 100%
projects/models.py 45 2 96% 34, 39
projects/templatetags/__init__.py 0 0 100%
projects/templatetags/project_tags.py 5 0 100%
projects/urls.py 3 0 100%
projects/views.py 35 0 100%
tock/__init__.py 0 0 100%
tock/management/__init__.py 0 0 100%
tock/management/commands/__init__.py 0 0 100%
tock/remote_user_auth.py 21 0 100%
tock/urls.py 11 2 82% 35-36
tock/utils.py 21 0 100%
tock/wsgi.py 6 6 0% 10-18
-----------------------------------------------------------------------------
TOTAL 807 66 92%
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up
tock_db_1 is up-to-date
Creating tock_tock_1
Attaching to tock_db_1, tock_tock_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1 | creating subdirectories ... ok
db_1 | selecting default max_connections ... 100
db_1 | selecting default shared_buffers ... 128MB
db_1 | selecting dynamic shared memory implementation ... posix
db_1 | creating configuration files ... ok
db_1 | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
db_1 | initializing pg_authid ... ok
db_1 | initializing dependencies ... ok
db_1 | creating system views ... ok
db_1 | loading system objects' descriptions ... ok
db_1 | creating collations ... ok
db_1 | creating conversions ... ok
db_1 | creating dictionaries ... ok
db_1 | setting privileges on built-in objects ... ok
db_1 | creating information schema ... ok
db_1 | loading PL/pgSQL server-side language ... ok
db_1 | vacuuming database template1 ... ok
db_1 | copying template1 to template0 ... ok
db_1 | copying template1 to postgres ... ok
db_1 |
db_1 | WARNING: enabling "trust" authentication for local connections
db_1 | You can change this by editing pg_hba.conf or using the option -A, or
db_1 | --auth-local and --auth-host, the next time you run initdb.
db_1 | syncing data to disk ... ok
db_1 |
db_1 | Success. You can now start the database server using:
db_1 |
db_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1 |
db_1 | waiting for server to start....LOG: database system was shut down at 2016-03-18 21:58:28 UTC
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | done
db_1 | server started
db_1 | CREATE DATABASE
db_1 |
db_1 | CREATE ROLE
db_1 |
db_1 |
db_1 | /docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db_1 |
db_1 | LOG: received fast shutdown request
db_1 | LOG: aborting any active transactions
db_1 | LOG: autovacuum launcher shutting down
db_1 | LOG: shutting down
db_1 | waiting for server to shut down....LOG: database system is shut down
db_1 | done
db_1 | server stopped
db_1 |
db_1 | PostgreSQL init process complete; ready for start up.
db_1 |
db_1 | LOG: database system was shut down at 2016-03-18 21:58:29 UTC
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | ERROR: syntax error at or near "NOT" at character 20
db_1 | STATEMENT: CREATE DATABASE IF NOT EXISTS "tock-test"
db_1 | FATAL: database "tock-test" does not exist
db_1 | ERROR: duplicate key value violates unique constraint "hours_timecard_user_id_5761a51b0c14b393_uniq"
db_1 | DETAIL: Key (user_id, reporting_period_id)=(1, 29) already exists.
db_1 | STATEMENT: INSERT INTO "hours_timecard" ("user_id", "reporting_period_id", "submitted", "created", "modified") VALUES (1, 29, false, '2016-03-18T22:00:02.197936+00:00'::timestamptz, '2016-03-18T22:00:02.197954+00:00'::timestamptz) RETURNING "hours_timecard"."id"
^CERROR: Aborting.
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up -d
tock_db_1 is up-to-date
tock_tock_1 is up-to-date
➜ tock git:(CivicVision-328-docker-compose-setup) ps
PID TTY TIME CMD
322 ttys000 0:00.19 -zsh
336 ttys001 0:00.17 -zsh
348 ttys002 0:00.17 -zsh
359 ttys003 0:00.16 -zsh
369 ttys004 0:00.25 -zsh
1716 ttys005 0:00.14 -zsh
1963 ttys005 0:00.01 bash --login /Applications/Docker/Docker Quickstart Terminal.app/Contents/Resou
2251 ttys005 0:00.16 /bin/zsh --login
2654 ttys006 0:00.13 -zsh
2901 ttys006 0:00.01 bash --login /Applications/Docker/Docker Quickstart Terminal.app/Contents/Resou
3077 ttys006 0:00.12 /bin/zsh --login
3328 ttys007 0:00.15 -zsh
3666 ttys008 0:00.25 -zsh
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1a3eccbb1e82 tock_tock "python manage.py run" About a minute ago Up 59 seconds 0.0.0.0:80->4001/tcp tock_tock_1
7de5b4f3c7dc postgres "/docker-entrypoint.s" 2 minutes ago Up 2 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine ip
192.168.99.100
➜ tock git:(CivicVision-328-docker-compose-setup) docker attach 1a3eccbb1e82
^C% ➜ tock git:(CivicVision-328-docker-compose-setup) docker attach 1a3eccbb1e82
You cannot attach to a stopped container, start it first
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7de5b4f3c7dc postgres "/docker-entrypoint.s" 9 minutes ago Up 9 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up
tock_db_1 is up-to-date
Starting tock_tock_1
Attaching to tock_db_1, tock_tock_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1 | creating subdirectories ... ok
db_1 | selecting default max_connections ... 100
db_1 | selecting default shared_buffers ... 128MB
db_1 | selecting dynamic shared memory implementation ... posix
db_1 | creating configuration files ... ok
db_1 | creating template1 database in /var/lib/postgresql/data/base/1 ... ok
db_1 | initializing pg_authid ... ok
db_1 | initializing dependencies ... ok
db_1 | creating system views ... ok
db_1 | loading system objects' descriptions ... ok
db_1 | creating collations ... ok
db_1 | creating conversions ... ok
db_1 | creating dictionaries ... ok
db_1 | setting privileges on built-in objects ... ok
db_1 | creating information schema ... ok
db_1 | loading PL/pgSQL server-side language ... ok
db_1 | vacuuming database template1 ... ok
db_1 | copying template1 to template0 ... ok
db_1 | copying template1 to postgres ... ok
db_1 |
db_1 | WARNING: enabling "trust" authentication for local connections
db_1 | You can change this by editing pg_hba.conf or using the option -A, or
db_1 | --auth-local and --auth-host, the next time you run initdb.
db_1 | syncing data to disk ... ok
db_1 |
db_1 | Success. You can now start the database server using:
db_1 |
db_1 | pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1 |
db_1 | waiting for server to start....LOG: database system was shut down at 2016-03-18 21:58:28 UTC
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | done
db_1 | server started
db_1 | CREATE DATABASE
db_1 |
db_1 | CREATE ROLE
db_1 |
db_1 |
db_1 | /docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db_1 |
db_1 | LOG: received fast shutdown request
db_1 | LOG: aborting any active transactions
db_1 | LOG: autovacuum launcher shutting down
db_1 | LOG: shutting down
db_1 | waiting for server to shut down....LOG: database system is shut down
db_1 | done
db_1 | server stopped
db_1 |
db_1 | PostgreSQL init process complete; ready for start up.
db_1 |
db_1 | LOG: database system was shut down at 2016-03-18 21:58:29 UTC
db_1 | LOG: MultiXact member wraparound protections are now enabled
db_1 | LOG: database system is ready to accept connections
db_1 | LOG: autovacuum launcher started
db_1 | ERROR: syntax error at or near "NOT" at character 20
db_1 | STATEMENT: CREATE DATABASE IF NOT EXISTS "tock-test"
db_1 | FATAL: database "tock-test" does not exist
db_1 | ERROR: duplicate key value violates unique constraint "hours_timecard_user_id_5761a51b0c14b393_uniq"
db_1 | DETAIL: Key (user_id, reporting_period_id)=(1, 29) already exists.
db_1 | STATEMENT: INSERT INTO "hours_timecard" ("user_id", "reporting_period_id", "submitted", "created", "modified") VALUES (1, 29, false, '2016-03-18T22:00:02.197936+00:00'::timestamptz, '2016-03-18T22:00:02.197954+00:00'::timestamptz) RETURNING "hours_timecard"."id"
tock_1 | /usr/local/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system.
tock_1 | return f(*args, **kwds)
tock_1 |
çcç^CERROR: Aborting.
➜ tock git:(CivicVision-328-docker-compose-setup)
➜ tock git:(CivicVision-328-docker-compose-setup)
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1a3eccbb1e82 tock_tock "python manage.py run" 11 minutes ago Up 3 minutes 0.0.0.0:80->4001/tcp tock_tock_1
7de5b4f3c7dc postgres "/docker-entrypoint.s" 12 minutes ago Up 12 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker stop 1a3eccbb1e82
1a3eccbb1e82
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7de5b4f3c7dc postgres "/docker-entrypoint.s" 13 minutes ago Up 13 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up -d
tock_db_1 is up-to-date
Starting tock_tock_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1a3eccbb1e82 tock_tock "python manage.py run" 12 minutes ago Up 18 seconds 0.0.0.0:80->4001/tcp tock_tock_1
7de5b4f3c7dc postgres "/docker-entrypoint.s" 13 minutes ago Up 13 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker stop 1a3eccbb1e82 7de5b4f3c7dc
1a3eccbb1e82
7de5b4f3c7dc
➜ tock git:(CivicVision-328-docker-compose-setup) docker rm 1a3eccbb1e82 7de5b4f3c7dc
1a3eccbb1e82
7de5b4f3c7dc
➜ tock git:(CivicVision-328-docker-compose-setup) docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
tock_tock latest d49397811187 15 minutes ago 738.5 MB
postgres latest dbc8c4900ce5 2 days ago 264.6 MB
python 3.4 85bfa05f5c49 9 days ago 686.4 MB
hello-world latest 690ed74de00f 5 months ago 960 B
➜ tock git:(CivicVision-328-docker-compose-setup) docker
Usage: docker [OPTIONS] COMMAND [arg...]
docker [ --help | -v | --version ]
A self-sufficient runtime for containers.
Options:
--config=~/.docker Location of client config files
-D, --debug Enable debug mode
-H, --host=[] Daemon socket(s) to connect to
-h, --help Print usage
-l, --log-level=info Set the logging level
--tls Use TLS; implied by --tlsverify
--tlscacert=~/.docker/machine/machines/default/ca.pem Trust certs signed only by this CA
--tlscert=~/.docker/machine/machines/default/cert.pem Path to TLS certificate file
--tlskey=~/.docker/machine/machines/default/key.pem Path to TLS key file
--tlsverify=true Use TLS and verify the remote
-v, --version Print version information and quit
Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on a container or image
kill Kill a running container
load Load an image from a tar archive or STDIN
login Register or log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
network Manage Docker networks
pause Pause all processes within a container
port List port mappings or a specific mapping for the CONTAINER
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart a container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save an image(s) to a tar archive
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop a running container
tag Tag an image into a repository
top Display the running processes of a container
unpause Unpause all processes within a container
update Update resources of one or more containers
version Show the Docker version information
volume Manage Docker volumes
wait Block until a container stops, then print its exit code
Run 'docker COMMAND --help' for more information on a command.
➜ tock git:(CivicVision-328-docker-compose-setup) docker rmi 1a3eccbb1e82 7de5b4f3c7dc
Failed to remove image (1a3eccbb1e82): Error response from daemon: No such image: 1a3eccbb1e82:latest
Failed to remove image (7de5b4f3c7dc): Error response from daemon: No such image: 7de5b4f3c7dc:latest
➜ tock git:(CivicVision-328-docker-compose-setup) docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
tock_tock latest d49397811187 15 minutes ago 738.5 MB
postgres latest dbc8c4900ce5 2 days ago 264.6 MB
python 3.4 85bfa05f5c49 9 days ago 686.4 MB
hello-world latest 690ed74de00f 5 months ago 960 B
➜ tock git:(CivicVision-328-docker-compose-setup) docker rmi tock_tock postgres
Failed to remove image (tock_tock): Error response from daemon: conflict: unable to remove repository reference "tock_tock" (must force) - container 1ab6a5f6a13f is using its referenced image d49397811187
Failed to remove image (postgres): Error response from daemon: conflict: unable to remove repository reference "postgres" (must force) - container e9e0ddf021d0 is using its referenced image dbc8c4900ce5
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
➜ tock git:(CivicVision-328-docker-compose-setup) docker rm $(docker ps -a -q)
9e12177dd7e8
1ab6a5f6a13f
e9e0ddf021d0
c78742f667d6
ad0fe6ece6c0
2b362b65b981
47f98a562669
➜ tock git:(CivicVision-328-docker-compose-setup) docker rmi $(docker images -q)
Untagged: tock_tock:latest
Deleted: sha256:d49397811187385afe9b23fc1b03b47fcf6664f82c11e9a8fb720a9ac34746d9
Deleted: sha256:be710aa3b796456d067a970e6445fc7d251b699f5fabc463fb1dd308368b7fbf
Deleted: sha256:ceabe457ba30383e9805666da7ea8a7f697c0f67a794a948935602d185e77374
Deleted: sha256:098cdef8d1c40e53da9889fd93c1c74eb029d0f4ccbc90ca0c451d0f6a0e20cc
Deleted: sha256:2e4e2d1b7520466f643f1ba7570ee8306f5929acd8eb4bb829bcba7d2a71771f
Deleted: sha256:a9190a2ab6d9f9a45b4917b8358f028a52b5e36c7a2c4ea7fa0798c1828a183b
Deleted: sha256:84fe8aa2a3db5f4824284940e191306e6ae5f521492ac86f31526d69d60264a3
Deleted: sha256:b14f5bb5b282df0d4d43ff639c8cfc3dec95b787c0bf5627f81cc48d443ba476
Deleted: sha256:14f8bada747de7462841ca3a900f897b2cdb7dc1616970abe634fb2f83c65078
Deleted: sha256:c4af95c51e00116bc20bd1ff7b3ad4a20ac75b306249502646e30ff9f64e7c46
Deleted: sha256:64d2b4a4f19f025022b14c72482b072915e18c3a516a8f51a2d795b6239261f1
Deleted: sha256:59e7f3d301d35bfa4611f230a03b92a2c7f84e76e35c3a6795bdc37e8a443ccb
Deleted: sha256:82f0144284bebe1142dd31cbb52200bc5b8ef4f9aa2f7c3e8b2ae2db75e57b33
Deleted: sha256:e9965f96130f107a4ef70c05c762fb3ccc1d8061f3d3997bd274db1e54024efd
Deleted: sha256:039485b930fe43890c05fdd37b740916f34f805647bfdfe177c461851cb0876c
Deleted: sha256:20e109e2708a9da7f5ca8c3e0746914a2e7ee6ccbdead7e4e8621fc688a68f2c
Untagged: postgres:latest
Deleted: sha256:dbc8c4900ce5bcfe7152fedbb4e52d71709b47b4016edf189a4ceba13b65aa4b
Deleted: sha256:7da2aca8ccf4e8a9de0eb46898c385eed71899c39f0311dcfe155f1771842efc
Deleted: sha256:b9b153ea9739e530ce153ffd9c9bffe84132375220cd8f95b941eb6d5011ad20
Deleted: sha256:c9a59be0678a316eb0d6d302c920d1b5074544b36d790236992f82127d5276bb
Deleted: sha256:a3918fbbfe62aa7790f6e8fb6865947039378c1abcb2e9bd24b375684c864b6e
Deleted: sha256:e0994e5df5bc706c0fdddb796f779c2bc6d639a9f5a52fff8e7fe0f0c05db51c
Deleted: sha256:6439e0d10d9129cbf57b51470903589ab8958109c16d2ead7898d6811a6c86a1
Deleted: sha256:2e52aba31d4c0995ee8df12c5f5d6a5786b5f481d04ce211681b01f3f9501112
Deleted: sha256:d1a40099ef759fdbb51dd0ffc494e6d327ceb8bbad7f18a7563b817bd92fd379
Deleted: sha256:33f49bf09d0a2496f205ad2b46ff2de7f45910daf4d81846da0f855651e7e362
Deleted: sha256:0207a3d1a83d8413067df22524e1b65b8d2cee62427ac166776645289b985b81
Deleted: sha256:1877b4e646879bc2b7e755cae4ac177fa0a74c87283348f3a084289dea9e9949
Deleted: sha256:90d0124255387663c03fa8fb6e77b2637c1157f1581c19fe01615d9e837b8262
Deleted: sha256:b559d250f77ff831d389b4e3774aabf80fa1341c0d8845770e5b6e943da8ba14
Deleted: sha256:89a88db5b0b189171eace721e6c57a632014cf3595f46a0d5f91d55f0cc498bb
Deleted: sha256:27d4529aa70c32bbc5d24d2fc627e488ad12c1a49b8eea444d7cdd919a4c4238
Deleted: sha256:639760cb8e8754ea5049069dcdcf605217e98a2be0fd245b3d15202763b27514
Deleted: sha256:592eb54560fb389aa59b46bfe320fe45008c3ee7edd2fcfe3e5275e4e17d68a7
Deleted: sha256:4d6d5ffbae09026abd35e18d0223dcdf666f27cd1959f0cae2d8b06f3e75ba2d
Deleted: sha256:24e9b15ac9d43c8113a14ba4537990609ffccb38b0c732efc82738ae28cb1e4c
Deleted: sha256:07a18bc2b900320f3138279be8e9d2181c0819f0940d83f292f3e7708a66e599
Untagged: python:3.4
Deleted: sha256:85bfa05f5c49c0f87208b1bb18d8b9244c389ea339bea3286218bfaa7a6f1f61
Deleted: sha256:2fcead2f5d503ed614f8ae874d864a0c69559a359413e43c3db9a8706b50dd2d
Deleted: sha256:a07d777af4573c83e9b9487cf6400cccd717ba8f65b26da6c67ec4ff4f9f112f
Deleted: sha256:6fc16d66a868c19d7060de42f8ea3531de7aab0fee08b419b3eb7b5fa4785059
Deleted: sha256:0929ca131328fa11e55ee99f9eda173ed66262a5c5a7554818ff3b90ab15e360
Deleted: sha256:510ce64f252d06286b18e20d6fb652297c84955da340df60e42d7d608575f5c1
Deleted: sha256:27830040328b33172a05ff2ec442d159d2c435e4c9ce191517a1cafcf4815ca7
Deleted: sha256:e5f5ae1c133cf2ff663e5b84ef3a3ad968042de715ab4e434cd2ec9381a577cf
Deleted: sha256:db4fe2b7a2858e49c081a8e1aee1d4a81b9271125ad2544c16b9b09f358370b1
Deleted: sha256:afb8bc79389e9a683dc3ca5bca5c0c355faf79c9fbdab5e655361c595a066d2d
Deleted: sha256:e0580a94a378059b3d97495c0e018be1032d1438b7f835316ab90f04c02cdd8e
Deleted: sha256:6954adeb400ddb8610ecf295b13b80f7a5c8924309474932eb3cb6ea56c7e05b
Deleted: sha256:894fdee79cd8b48c0b0b6ac6664ad0327c67782c80a1d81ac2d0a65505d0e116
Deleted: sha256:917c0fc99b353c0397a9effdf042d72529de7c452669b1e11b05bec3088c7056
Untagged: hello-world:latest
Deleted: sha256:690ed74de00f99a7d00a98a5ad855ac4febd66412be132438f9b8dbd300a937d
Deleted: sha256:32ada9ef4cd3ccd536337fbcd8cdb6e026237f59db80498f83f3175176561ffb
Deleted: sha256:b652ec3a27e758f30de4742156b5d096bb19c82f2dc836e96e430323ba166ffe
➜ tock git:(CivicVision-328-docker-compose-setup) cd ..
➜ ~ rm -rf tock
➜ ~ git clone git@github.com:18F/tock.git
Cloning into 'tock'...
remote: Counting objects: 3885, done.
remote: Total 3885 (delta 0), reused 0 (delta 0), pack-reused 3885
Receiving objects: 100% (3885/3885), 1.57 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2417/2417), done.
Checking connectivity... done.
➜ ~ cd tock
➜ tock git:(master) git checkout -b CivicVision-328-docker-compose-setup master
Switched to a new branch 'CivicVision-328-docker-compose-setup'
➜ tock git:(CivicVision-328-docker-compose-setup) git pull git://github.com/CivicVision/tock.git 328-docker-compose-setup
remote: Counting objects: 32, done.
remote: Total 32 (delta 20), reused 20 (delta 20), pack-reused 12
Unpacking objects: 100% (32/32), done.
From git://github.com/CivicVision/tock
* branch 328-docker-compose-setup -> FETCH_HEAD
Merge made by the 'recursive' strategy.
.travis.yml | 3 +++
Dockerfile | 17 +++++++++++++++++
README.md | 38 ++++++++++++++++++++++++++++++++++++++
docker-compose.yml | 19 +++++++++++++++++++
sample.env | 3 +++
scripts/docker-migrate.sh | 1 +
scripts/docker-seed.sh | 1 +
scripts/docker-test.sh | 3 +++
tock/tock/settings/dev.py | 7 ++++---
tock/tock/settings/test.py | 5 ++++-
10 files changed, 93 insertions(+), 4 deletions(-)
create mode 100644 Dockerfile
create mode 100644 docker-compose.yml
create mode 100644 sample.env
create mode 100755 scripts/docker-migrate.sh
create mode 100755 scripts/docker-seed.sh
create mode 100755 scripts/docker-test.sh
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose build tock
ERROR: Couldn't find env file: /Users/alandelevie/tock/.env
➜ tock git:(CivicVision-328-docker-compose-setup) cp sample.env .env
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose build tock
Building tock
Step 1 : FROM python:3.4
3.4: Pulling from library/python
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
0f35d0fe50cc: Pull complete
627b6479c8f7: Pull complete
67c44324f4e3: Pull complete
9ee7e6ec2a05: Pull complete
bbaa314a5925: Pull complete
629f63939484: Pull complete
Digest: sha256:e93391f3bd9683adedee8c19b22fe10a52e43975c2dfdd3c26e97b07d9a0e177
Status: Downloaded newer image for python:3.4
---> 85bfa05f5c49
Step 2 : MAINTAINER Mila Frerichs mila@civicvision.de
---> Running in b79980f2e38e
---> bb0fc80fbdce
Removing intermediate container b79980f2e38e
Step 3 : RUN mkdir /tock
---> Running in 40c44856ce2c
---> efee07b5b7e4
Removing intermediate container 40c44856ce2c
Step 4 : WORKDIR /tock
---> Running in b0e3be34256d
---> ea931db9d8e1
Removing intermediate container b0e3be34256d
Step 5 : COPY requirements.txt /tock
---> 92f1ee8ee4f9
Removing intermediate container 3d2abac66adf
Step 6 : COPY requirements-dev.txt /tock
---> f25466209d5f
Removing intermediate container 54c76d75f4d7
Step 7 : RUN pip install -r requirements.txt
---> Running in 7cc099745991
Collecting Django==1.8.9 (from -r requirements.txt (line 1))
Downloading Django-1.8.9-py2.py3-none-any.whl (6.2MB)
Collecting dj-database-url==0.3.0 (from -r requirements.txt (line 2))
Downloading dj_database_url-0.3.0-py2.py3-none-any.whl
Collecting psycopg2==2.6 (from -r requirements.txt (line 3))
Downloading psycopg2-2.6.tar.gz (367kB)
Collecting model-mommy==1.2.3 (from -r requirements.txt (line 4))
Downloading model_mommy-1.2.3.tar.gz
Collecting waitress==0.8.9 (from -r requirements.txt (line 5))
Downloading waitress-0.8.9.tar.gz (121kB)
Collecting whitenoise==1.0.6 (from -r requirements.txt (line 6))
Downloading whitenoise-1.0.6-py2.py3-none-any.whl
Collecting djangorestframework==3.1.2 (from -r requirements.txt (line 7))
Downloading djangorestframework-3.1.2-py2.py3-none-any.whl (463kB)
Collecting djangorestframework-csv==1.3.3 (from -r requirements.txt (line 8))
Downloading djangorestframework-csv-1.3.3.tar.gz
Collecting bleach==1.4.2 (from -r requirements.txt (line 9))
Downloading bleach-1.4.2-py2.py3-none-any.whl
Collecting six (from model-mommy==1.2.3->-r requirements.txt (line 4))
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.4/site-packages (from waitress==0.8.9->-r requirements.txt (line 5))
Collecting html5lib>=0.999 (from bleach==1.4.2->-r requirements.txt (line 9))
Downloading html5lib-0.9999999.tar.gz (889kB)
Installing collected packages: Django, dj-database-url, psycopg2, six, model-mommy, waitress, whitenoise, djangorestframework, djangorestframework-csv, html5lib, bleach
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'done'
Running setup.py install for model-mommy: started
Running setup.py install for model-mommy: finished with status 'done'
Running setup.py install for waitress: started
Running setup.py install for waitress: finished with status 'done'
Running setup.py install for djangorestframework-csv: started
Running setup.py install for djangorestframework-csv: finished with status 'done'
Running setup.py install for html5lib: started
Running setup.py install for html5lib: finished with status 'done'
Successfully installed Django-1.8.9 bleach-1.4.2 dj-database-url-0.3.0 djangorestframework-3.1.2 djangorestframework-csv-1.3.3 html5lib-0.9999999 model-mommy-1.2.3 psycopg2-2.6 six-1.10.0 waitress-0.8.9 whitenoise-1.0.6
You are using pip version 8.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---> 58dccfe54dd1
Removing intermediate container 7cc099745991
Step 8 : RUN pip install -r requirements-dev.txt
---> Running in 96507595e556
Collecting coverage (from -r requirements-dev.txt (line 1))
Downloading coverage-4.0.3.tar.gz (354kB)
Collecting django-debug-toolbar (from -r requirements-dev.txt (line 2))
Downloading django_debug_toolbar-1.4-py2.py3-none-any.whl (212kB)
Collecting django-webtest (from -r requirements-dev.txt (line 3))
Downloading django_webtest-1.7.8-py2.py3-none-any.whl
Collecting factory-boy (from -r requirements-dev.txt (line 4))
Downloading factory_boy-2.6.1-py2.py3-none-any.whl
Collecting nplusone (from -r requirements-dev.txt (line 5))
Downloading nplusone-0.6.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): Django>=1.7 in /usr/local/lib/python3.4/site-packages (from django-debug-toolbar->-r requirements-dev.txt (line 2))
Collecting sqlparse (from django-debug-toolbar->-r requirements-dev.txt (line 2))
Downloading sqlparse-0.1.19.tar.gz (58kB)
Collecting webtest>=1.3.3 (from django-webtest->-r requirements-dev.txt (line 3))
Downloading WebTest-2.0.20.tar.gz (66kB)
Collecting fake-factory>=0.5.0 (from factory-boy->-r requirements-dev.txt (line 4))
Downloading fake_factory-0.5.7-py2.py3-none-any.whl (484kB)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9.0 in /usr/local/lib/python3.4/site-packages (from nplusone->-r requirements-dev.txt (line 5))
Collecting blinker>=1.3 (from nplusone->-r requirements-dev.txt (line 5))
Downloading blinker-1.4.tar.gz (111kB)
Collecting WebOb>=1.2 (from webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Downloading WebOb-1.6.0-py2.py3-none-any.whl (77kB)
Requirement already satisfied (use --upgrade to upgrade): waitress>=0.8.5 in /usr/local/lib/python3.4/site-packages (from webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Collecting beautifulsoup4 (from webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Downloading beautifulsoup4-4.4.1-py3-none-any.whl (81kB)
Collecting python-dateutil>=2.4 (from fake-factory>=0.5.0->factory-boy->-r requirements-dev.txt (line 4))
Downloading python_dateutil-2.5.1-py2.py3-none-any.whl (200kB)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.4/site-packages (from waitress>=0.8.5->webtest>=1.3.3->django-webtest->-r requirements-dev.txt (line 3))
Installing collected packages: coverage, sqlparse, django-debug-toolbar, WebOb, beautifulsoup4, webtest, django-webtest, python-dateutil, fake-factory, factory-boy, blinker, nplusone
Running setup.py install for coverage: started
Running setup.py install for coverage: finished with status 'done'
Running setup.py install for sqlparse: started
Running setup.py install for sqlparse: finished with status 'done'
Running setup.py install for webtest: started
Running setup.py install for webtest: finished with status 'done'
Running setup.py install for blinker: started
Running setup.py install for blinker: finished with status 'done'
Successfully installed WebOb-1.6.0 beautifulsoup4-4.4.1 blinker-1.4 coverage-4.0.3 django-debug-toolbar-1.4 django-webtest-1.7.8 factory-boy-2.6.1 fake-factory-0.5.7 nplusone-0.6.1 python-dateutil-2.5.1 sqlparse-0.1.19 webtest-2.0.20
You are using pip version 8.1.0, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
---> 314d89cbecf7
Removing intermediate container 96507595e556
Step 9 : COPY tock /tock
---> e5a5467172f4
Removing intermediate container 27617636920a
Step 10 : EXPOSE 4001
---> Running in db819c5cb395
---> b78eadcfd7ad
Removing intermediate container db819c5cb395
Step 11 : CMD waitress-serve --port=4001 tock.wsgi:application
---> Running in 8f94ae3c709e
---> 9350c15d8cd3
Removing intermediate container 8f94ae3c709e
Successfully built 9350c15d8cd3
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-migrate.sh
Pulling db (postgres:latest)...
latest: Pulling from library/postgres
fdd5d7827f33: Already exists
a3ed95caeb02: Pull complete
beb59dc2ad34: Pull complete
f42a5322ef13: Pull complete
f6719ae287c6: Pull complete
0dc08677d778: Pull complete
5f3b03c1dd66: Pull complete
4d4c6707d860: Pull complete
11f8efebbb9b: Pull complete
edefda034373: Pull complete
5fe4bba523f0: Pull complete
a2d55eea3342: Pull complete
Digest: sha256:bf1d7cbeb86b76f4c0991061515ebb13c6b57a9588a92f795eaebaede1c3657b
Status: Downloaded newer image for postgres:latest
Creating tock_db_1
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "db" (172.18.0.2) and accepting
TCP/IP connections on port 5432?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 19, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/executor.py", line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 47, in __init__
self.build_graph()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 191, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 162, in cursor
cursor = self.make_debug_cursor(self._cursor())
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 135, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.4/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host "db" (172.18.0.2) and accepting
TCP/IP connections on port 5432?
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-migrate.sh
Operations to perform:
Synchronize unmigrated apps: messages, staticfiles, api, debug_toolbar, tock
Apply all migrations: hours, employees, projects, contenttypes, sessions, admin, auth
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying employees.0001_initial... OK
Applying employees.0002_auto_20150429_1851... OK
Applying employees.0003_auto_20150430_1815... OK
Applying employees.0004_employee... OK
Applying employees.0005_delete_employee... OK
Applying employees.0006_userdata_current_employee... OK
Applying projects.0001_initial... OK
Applying hours.0001_initial... OK
Applying hours.0002_auto_20150405_0317... OK
Applying hours.0003_auto_20150408_1934... OK
Applying hours.0004_auto_20150408_1934... OK
Applying hours.0005_auto_20150413_1839... OK
Applying hours.0006_auto_20150428_0150... OK
Applying hours.0007_reportingperiod_message... OK
Applying hours.0008_auto_20150514_1651... OK
Applying hours.0009_remove_timecardobject_time_percentage... OK
Applying hours.0010_auto_20150519_1436... OK
Applying hours.0011_auto_20151203_1532... OK
Applying hours.0012_auto_20151224_1625... OK
Applying hours.0013_timecardobject_notes... OK
Applying hours.0014_timecard_submitted... OK
Applying projects.0002_auto_20151020_2043... OK
Applying projects.0003_auto_20151103_2041... OK
Applying projects.0004_remove_project_priority... OK
Applying projects.0005_project_mbnumber... OK
Applying projects.0006_auto_20151229_1618... OK
Applying projects.0007_auto_20160310_0136... OK
Applying sessions.0001_initial... OK
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-seed.sh
Installed 15891 object(s) from 1 fixture(s)
➜ tock git:(CivicVision-328-docker-compose-setup) scripts/docker-test.sh
ERROR: syntax error at or near "NOT"
LINE 1: CREATE DATABASE IF NOT EXISTS "tock-test"
^
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
psycopg2.OperationalError: FATAL: database "tock-test" does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 19, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/commands/syncdb.py", line 25, in handle
call_command("migrate", **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 120, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/executor.py", line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 47, in __init__
self.build_graph()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/loader.py", line 191, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
self.ensure_schema()
File "/usr/local/lib/python3.4/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 164, in cursor
cursor = self.make_cursor(self._cursor())
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 135, in _cursor
self.ensure_connection()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.4/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 130, in ensure_connection
self.connect()
File "/usr/local/lib/python3.4/site-packages/django/db/backends/base/base.py", line 119, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.4/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.4/site-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
django.db.utils.OperationalError: FATAL: database "tock-test" does not exist
/usr/local/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system.
return f(*args, **kwds)
Creating test database for alias 'default'...
..........................................................................................
----------------------------------------------------------------------
Ran 90 tests in 4.813s
OK
Destroying test database for alias 'default'...
Name Stmts Miss Cover Missing
-----------------------------------------------------------------------------
api/__init__.py 0 0 100%
api/admin.py 1 0 100%
api/models.py 1 0 100%
api/renderers.py 27 1 96% 55
api/urls.py 3 0 100%
api/views.py 158 1 99% 199
employees/__init__.py 0 0 100%
employees/admin.py 0 0 100%
employees/forms.py 15 0 100%
employees/models.py 7 0 100%
employees/urls.py 3 0 100%
employees/views.py 50 0 100%
hours/__init__.py 0 0 100%
hours/admin.py 41 17 59% 15-17, 20, 29-49
hours/factories.py 27 0 100%
hours/forms.py 94 4 96% 64, 67, 134-135
hours/models.py 47 1 98% 80
hours/templatetags/__init__.py 0 0 100%
hours/templatetags/has_submitted_timesheet.py 5 0 100%
hours/urls/__init__.py 0 0 100%
hours/urls/reports.py 3 0 100%
hours/urls/timesheets.py 3 0 100%
hours/utils.py 7 0 100%
hours/views.py 141 32 77% 78-114, 117, 163-171, 176-185, 201, 289
projects/__init__.py 0 0 100%
projects/admin.py 11 0 100%
projects/factories.py 16 0 100%
projects/models.py 45 2 96% 34, 39
projects/templatetags/__init__.py 0 0 100%
projects/templatetags/project_tags.py 5 0 100%
projects/urls.py 3 0 100%
projects/views.py 35 0 100%
tock/__init__.py 0 0 100%
tock/management/__init__.py 0 0 100%
tock/management/commands/__init__.py 0 0 100%
tock/remote_user_auth.py 21 0 100%
tock/urls.py 11 2 82% 35-36
tock/utils.py 21 0 100%
tock/wsgi.py 6 6 0% 10-18
-----------------------------------------------------------------------------
TOTAL 807 66 92%
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up -d
tock_db_1 is up-to-date
Creating tock_tock_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27c89270981a tock_tock "python manage.py run" 5 seconds ago Up 3 seconds 0.0.0.0:80->4001/tcp tock_tock_1
a9cc8f971780 postgres "/docker-entrypoint.s" About a minute ago Up About a minute 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker attach 27c89270981a
^C% ➜ tock git:(CivicVision-328-docker-compose-setup) docker-machine ip
192.168.99.100
➜ tock git:(CivicVision-328-docker-compose-setup) curl -I 192.168.99.100/employees
curl: (7) Failed to connect to 192.168.99.100 port 80: Connection refused
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a9cc8f971780 postgres "/docker-entrypoint.s" 2 minutes ago Up 2 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker-compose up -d
tock_db_1 is up-to-date
Starting tock_tock_1
➜ tock git:(CivicVision-328-docker-compose-setup) docker -s
flag provided but not defined: -s
See 'docker --help'.
➜ tock git:(CivicVision-328-docker-compose-setup) docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27c89270981a tock_tock "python manage.py run" About a minute ago Up 4 seconds 0.0.0.0:80->4001/tcp tock_tock_1
a9cc8f971780 postgres "/docker-entrypoint.s" 2 minutes ago Up 2 minutes 5432/tcp tock_db_1
➜ tock git:(CivicVision-328-docker-compose-setup) curl -I 192.168.99.100/employees
HTTP/1.0 301 MOVED PERMANENTLY
Date: Fri, 18 Mar 2016 22:19:42 GMT
Server: WSGIServer/0.2 CPython/3.4.4
Content-Type: text/html; charset=utf-8
Location: http://192.168.99.100/employees/
X-Frame-Options: SAMEORIGIN
➜ tock git:(CivicVision-328-docker-compose-setup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment