Commit 9300c6f4 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

prod

parent 13940825
......@@ -13,4 +13,4 @@ RUN pip install --no-cache-dir -r requirements.txt && \
ADD . .
CMD ./manage.py runserver
CMD ./manage.py runserver 0.0.0.0:8000
......@@ -24,3 +24,11 @@ You can then go to http://localhost:8000
## TODO
- fix urls (https://api.github.com/repos/stack-of-tasks/pinocchio)
## Prod
```
docker-compose build
docker-compose up -d
docker-compose exec app ./manage.py collectstatic --noinput
```
......@@ -127,7 +127,8 @@ USE_TZ = True
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_ROOT = '/srv/media'
STATIC_ROOT = '/srv/static'
SITE_ID = 1
DJANGO_TABLES2_TEMPLATE = 'rainboard/tables.html'
......
version: '3'
volumes:
static:
media:
services:
app:
build: .
restart: unless-stopped
volumes:
- ./db.sqlite3:/app/db.sqlite3
- /srv/dashboard/repositories:/srv/dashboard/repositories
- /srv/dashboard/robotpkg:/srv/dashboard/robotpkg
ports:
- '8001:8000'
- static:/srv/static
- media:/srv/media
env_file:
- .env
nginx:
image: nim65s/ndh:nginx
restart: unless-stopped
volumes:
- static:/srv/static
- media:/srv/media
ports:
- 6500:8000
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment