From 4184ed302940d22918c496077215d4c6e26dd211 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Tue, 15 Dec 2015 12:44:15 +0100 Subject: [PATCH] replace /opt by /srv --- Dockerfile | 14 +++++++------- app/deploy/celery_app.sh | 2 +- app/deploy/nginx-app.conf | 4 ++-- app/deploy/start_app.sh | 4 ++-- app/sandbox/settings.py | 6 +++--- docker-compose.yml | 12 ++++++------ 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index f4a090fd..9ae01c2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,14 +18,14 @@ FROM parisson/timeside:latest-dev MAINTAINER Guillaume Pellerin , Thomas fillon -RUN mkdir /opt/app -RUN mkdir /opt/src -RUN mkdir /opt/src/app +RUN mkdir /srv/app +RUN mkdir /srv/src +RUN mkdir /srv/src/app -COPY . /opt/src/app -WORKDIR /opt/src/app +COPY . /srv/src/app +WORKDIR /srv/src/app RUN pip install -r requirements.txt -RUN pip install -r requirements-dev.txt --src /opt/src -WORKDIR /opt/app +RUN pip install -r requirements-dev.txt --src /srv/src +WORKDIR /srv/app EXPOSE 8000 diff --git a/app/deploy/celery_app.sh b/app/deploy/celery_app.sh index a89971d4..abc11f69 100644 --- a/app/deploy/celery_app.sh +++ b/app/deploy/celery_app.sh @@ -1,7 +1,7 @@ #!/bin/sh # paths -app='/opt/app' +app='/srv/app' manage=$app'/manage.py' wsgi=$app'/wsgi.py' diff --git a/app/deploy/nginx-app.conf b/app/deploy/nginx-app.conf index d1f07b92..4aaec53a 100644 --- a/app/deploy/nginx-app.conf +++ b/app/deploy/nginx-app.conf @@ -13,11 +13,11 @@ server { # Django media location /media { - alias /opt/media; # your Django project's media files - amend as required + alias /srv/media; # your Django project's media files - amend as required } # Django static location /static { - alias /opt/static; # your Django project's static files - amend as required + alias /srv/static; # your Django project's static files - amend as required } location / { diff --git a/app/deploy/start_app.sh b/app/deploy/start_app.sh index 296b5e30..18c1695c 100644 --- a/app/deploy/start_app.sh +++ b/app/deploy/start_app.sh @@ -1,10 +1,10 @@ #!/bin/sh # paths -app='/opt/app' +app='/srv/app' manage=$app'/manage.py' wsgi=$app'/wsgi.py' -static='/opt/static/' +static='/srv/static/' # uwsgi params port=8000 diff --git a/app/sandbox/settings.py b/app/sandbox/settings.py index 6278efff..67eb7751 100644 --- a/app/sandbox/settings.py +++ b/app/sandbox/settings.py @@ -19,7 +19,7 @@ MANAGERS = ADMINS # Full filesystem path to the project. #PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) -PROJECT_ROOT = '/opt/app/' +PROJECT_ROOT = '/srv/app/' DATABASES = { 'default': { @@ -77,7 +77,7 @@ USE_L10N = True # # if not os.path.exists(MEDIA_ROOT): # os.makedirs(MEDIA_ROOT) -MEDIA_ROOT = '/opt/media/' +MEDIA_ROOT = '/srv/media/' # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). @@ -89,7 +89,7 @@ MEDIA_URL = '/media/' # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/home/media/media.lawrence.com/static/" # STATIC_ROOT = '/var/www/static' -STATIC_ROOT = '/opt/static/' +STATIC_ROOT = '/srv/static/' # URL prefix for static files. # Example: "http://media.lawrence.com/static/" diff --git a/docker-compose.yml b/docker-compose.yml index 24df44c6..433e6b60 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,9 +25,9 @@ media: image: debian:jessie volumes: - - ./media/:/opt/media - - ./static/:/opt/static - - ./backup/:/opt/backup + - ./media/:/srv/media + - ./static/:/srv/static + - ./backup/:/srv/backup command: "true" db: @@ -49,8 +49,8 @@ search: app: build: . volumes: - - ./app/:/opt/app - - ./telemeta/:/opt/src/app/telemeta + - ./app/:/srv/app + - ./telemeta/:/srv/src/app/telemeta volumes_from: - media command: /bin/sh deploy/start_app.sh @@ -75,7 +75,7 @@ worker: nginx: image: nginx ports: - - "8001:80" + - "8000:80" volumes: - ./app/deploy/nginx-app.conf:/etc/nginx/conf.d/default.conf - ./log/:/var/log/nginx -- 2.39.5