Skip to content

Commit

Permalink
#7 - Update docker development environment
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeG committed May 1, 2018
1 parent a2e6f53 commit 5a3e188
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 41 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ RUN echo "[global]\nindex-url=http://10.42.0.82:3141/root/pypi/+simple/\ntrusted

RUN mkdir /code
RUN mkdir /config
ADD /config/requirements.txt /config/

# Install dependencies
COPY /config/requirements.txt /config/
RUN pip install --no-cache-dir -r /config/requirements.txt

# Copy code
WORKDIR /code
COPY . /code/
RUN pip install .

VOLUME /code/static
EXPOSE 8000

WORKDIR /code/website
CMD ["tail", "-f", "/dev/null"]
41 changes: 2 additions & 39 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,9 @@
version: '2'

volumes:
pgdata:

services:
postgres:
image: postgres # Lets update later...
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data/
environment:
- POSTGRES_PASSWORD=secret

web:
#image: pyar/pyarweb:dev
build: .
command: ["/bin/bash", "-c", "./docker-entrypoint.sh"] #"gunicorn website.wsgi -b 0.0.0.0:8000"
volumes:
- .:/code
links:
- postgres
depends_on:
- postgres
ports:
- "8008:8008"
expose:
- "8000"
environment:
- DB_USER=postgres
- DB_NAME=postgres
- DB_PASS=secret
- DB_SERVICE=postgres

nginx:
image: nginx
container_name: ng01
build: .
ports:
- "8000:8000"
volumes_from:
- web
volumes:
- ./config/nginx:/etc/nginx/conf.d
depends_on:
- web
- .:/code

0 comments on commit 5a3e188

Please sign in to comment.