Docker instructions
This commit is contained in:
parent
9d607b1ee7
commit
97a8119efb
|
@ -6,9 +6,6 @@ WORKDIR /usr/src/app
|
||||||
COPY requirements.txt /usr/src/app/
|
COPY requirements.txt /usr/src/app/
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
RUN python manage.py migrate
|
|
||||||
RUN python manage.py createsuperuser
|
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
ENV LANG en_US.UTF-8
|
ENV LANG en_US.UTF-8
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
.env
|
||||||
*.pyc
|
*.pyc
|
||||||
.sass-cache
|
.sass-cache
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
@ -60,9 +60,9 @@ Now access the admin panel with the user account you created earlier: http://loc
|
||||||
|
|
||||||
## Production notes
|
## Production notes
|
||||||
|
|
||||||
We are using [Dokku](http://dokku.viewdocs.io/) for automated deployment.
|
We suggest using Docker or [Dokku](http://dokku.viewdocs.io/) for automated deployment.
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo dokku apps:create phase-alpha
|
docker-compose run web python manage.py migrate
|
||||||
sudo dokku config:set phase-alpha BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-python
|
docker-compose run web python manage.py createsuperuser
|
||||||
```
|
```
|
||||||
|
|
|
@ -10,12 +10,13 @@ web:
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
environment:
|
environment:
|
||||||
|
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
|
||||||
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
- DEBUG=${DEBUG}
|
- DEBUG=${DEBUG}
|
||||||
- DEV=${DEBUG}
|
- DEV=${DEBUG}
|
||||||
|
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
|
||||||
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
|
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
|
||||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||||
- SECRET_KEY=${SECRET_KEY}
|
|
||||||
- ALLOWED_HOSTS=${HOSTNAME}
|
|
||||||
frontend:
|
frontend:
|
||||||
build: .
|
build: .
|
||||||
dockerfile: .dockerfile-frontend
|
dockerfile: .dockerfile-frontend
|
||||||
|
|
Loading…
Reference in New Issue