Compare commits

...

1 Commits

Author SHA1 Message Date
Oliver Marks ff3ad34929 Turn of cache dir to save memory.
continuous-integration/drone/push Build is failing Details
2019-05-04 17:49:17 +01:00
3 changed files with 35 additions and 17 deletions

View File

@ -9,7 +9,6 @@ steps:
POSTGRES_USER: mhackspace POSTGRES_USER: mhackspace
USE_DOCKER: yes USE_DOCKER: yes
DJANGO_SETTINGS_MODULE: config.settings.test DJANGO_SETTINGS_MODULE: config.settings.test
BUCKET_URL: http://minio:9000
commands: commands:
- cp -n env.example .env - cp -n env.example .env
- mkdir -p ./cache/packages ./cache/pip - mkdir -p ./cache/packages ./cache/pip
@ -19,22 +18,41 @@ steps:
- pytest -v - pytest -v
# - python manage.py test mhackspace --keepdb --verbosity 2 # - python manage.py test mhackspace --keepdb --verbosity 2
- name: docker-build
image: plugins/docker
secrets:
- source: DOCKER_USER
target: username
- source: DOCKER_PASS
target: password
settings:
repo: mhackspace-python
dockerfile: ./compose/django/Dockerfile
tags:
- latest
- name: publish-stage - name: publish-stage
pull: True pull: True
image: appleboy/drone-ssh image: appleboy/drone-ssh
host: stage.maidstone-hackspace.org.uk settings:
user: root host: stage.maidstone-hackspace.org.uk
secrets: [ ssh_key ] username:
port: 22 from_secret: ssh_user
command_timeout: 480 key:
script: from_secret: ssh_key
- cd /var/www/maidstone-hackspace-website port: 22
- git pull duration: 4m
- docker-compose -fstage.yml build
- docker-compose -fstage.yml run --rm django python manage.py compilescss command_timeout: 480
- docker-compose -fstage.yml run --rm django python manage.py collectstatic script:
- docker-compose -fstage.yml down --remove-orphans - cd /var/www/maidstone-hackspace-website
- docker-compose -fstage.yml up -d - git pull
- docker-compose -fstage.yml build
- docker-compose -fstage.yml run --rm django python manage.py compilescss
- docker-compose -fstage.yml run --rm django python manage.py collectstatic
- docker-compose -fstage.yml down --remove-orphans
- docker-compose -fstage.yml up -d
- echo 'Finished deploy'
- name: publish-live - name: publish-live
pull: True pull: True
@ -61,7 +79,7 @@ services:
- npm --version - npm --version
- npm install - npm install
- name: minio - name: bucket
image: minio/minio image: minio/minio
environment: environment:
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE

View File

@ -10,7 +10,7 @@ RUN apk add --no-cache git build-base gcc \
COPY ./requirements /requirements COPY ./requirements /requirements
RUN pip install --cache-dir ./cache/pip -r /requirements/local.txt \ RUN pip install --no-cache-dir -r /requirements/local.txt \
&& addgroup -g 1000 -S django \ && addgroup -g 1000 -S django \
&& adduser -u 1000 -S django -G django && adduser -u 1000 -S django -G django

View File

@ -10,7 +10,7 @@ RUN apk add --no-cache git build-base gcc \
COPY ./requirements /requirements COPY ./requirements /requirements
RUN pip install --cache-dir ./cache/pip -r /requirements/local.txt \ RUN pip install --no-cache-dir -r /requirements/local.txt \
&& addgroup -g 1000 -S django \ && addgroup -g 1000 -S django \
&& adduser -u 1000 -S django -G django && adduser -u 1000 -S django -G django