Skip to content

Commit

Permalink
Trying to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamQLiu committed Mar 16, 2015
1 parent 387434a commit 99ee76d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -24,7 +24,7 @@ RUN (cd /opt/job-waffle && sudo git remote add origin https://github.com/William
RUN (cd /opt/job-waffle && sudo git pull origin master)
RUN (cd /opt/job-waffle && pip install -r requirements.txt)
ADD . /opt/job-waffle/
CMD ["python", "manage.py", "migrate", "--noinput"]
CMD ["python", "manage.py", "collectstatic", "--noinput"]
#CMD ["python", "manage.py", "migrate", "--noinput"]
#CMD ["python", "manage.py", "collectstatic", "--noinput"]

EXPOSE 8000
11 changes: 7 additions & 4 deletions README.md
Expand Up @@ -69,13 +69,16 @@ Note: You need to add a 'settings.py' file for Heroku; I'm taking the site off H

Dockerfile is available on DockerHub [here](https://registry.hub.docker.com/u/williamqliu/job-waffle/dockerfile/)

1.) Install Docker and Docker-Compose on your development machine
2.) Use Docker-Compse to build the dev environment: `docker-compose run web`
3.) Then run `docker-compose up -d` to run your containers in daemonized mode
4.) Then run `docker-compose run web python manage.py syncdb`
1. Install Docker and Docker-Compose on your development machine
2. Use Docker-Compse to build the dev environment: `docker-compose run web`
3. Then run `docker-compose up -d` to run your containers in daemonized mode
4. Then run `docker-compose run web python manage.py syncdb`

Other helpful options include:
* `docker run -t jobwaffle_web` to go into container
* `docker-compose stop` to stop your containers
* `docker-compose run web python manage.py migrate`
* `docker-compose run web python manage.py collectstatic`

**Testing**

Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yml
@@ -1,11 +1,13 @@
db:
localhost:
image: postgres
web:
build: .
command: python manage.py syncdb --noinput
command: python manage.py collectstatic --noinput
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/opt/jobwaffle
ports:
- "8000:8000"
links:
- db
- localhost
3 changes: 2 additions & 1 deletion jobwaffle/settings.py
Expand Up @@ -56,7 +56,8 @@
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'db',
#'HOST': 'db',
'HOST': 'localhost',
'PORT': 5432,
}
}
Expand Down

0 comments on commit 99ee76d

Please sign in to comment.