mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
add collectstatic make command and newsblur_deploy dockerfile
This commit is contained in:
parent
c4bbd3a7a8
commit
f26ae11707
4 changed files with 24 additions and 6 deletions
11
Makefile
11
Makefile
|
@ -19,6 +19,9 @@ rebuild:
|
||||||
- RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker-compose down
|
- RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker-compose down
|
||||||
- RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker-compose up -d
|
- RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker-compose up -d
|
||||||
|
|
||||||
|
collectstatic:
|
||||||
|
- docker run --rm -v $(shell pwd):/srv/newsblur --platform linux/amd64 newsblur/newsblur_deploy
|
||||||
|
|
||||||
#creates newsblur, builds new images, and creates/refreshes SSL keys
|
#creates newsblur, builds new images, and creates/refreshes SSL keys
|
||||||
nb: pull
|
nb: pull
|
||||||
- RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker-compose down
|
- RUNWITHMAKEBUILD=True CURRENT_UID=${CURRENT_UID} CURRENT_GID=${CURRENT_GID} docker-compose down
|
||||||
|
@ -103,14 +106,18 @@ build_node:
|
||||||
- docker image build . --platform linux/amd64 --file=docker/node/Dockerfile --tag=newsblur/newsblur_node
|
- docker image build . --platform linux/amd64 --file=docker/node/Dockerfile --tag=newsblur/newsblur_node
|
||||||
build_monitor:
|
build_monitor:
|
||||||
- docker image build . --platform linux/amd64 --file=docker/monitor/Dockerfile --tag=newsblur/newsblur_monitor
|
- docker image build . --platform linux/amd64 --file=docker/monitor/Dockerfile --tag=newsblur/newsblur_monitor
|
||||||
build: build_web build_node build_monitor
|
build_deploy:
|
||||||
|
- docker image build . --platform linux/amd64 --file=docker/newsblur_deploy.Dockerfile --tag=newsblur/newsblur_deploy
|
||||||
|
build: build_web build_node build_monitor build_deploy
|
||||||
push_web: build_web
|
push_web: build_web
|
||||||
- docker push newsblur/newsblur_python3
|
- docker push newsblur/newsblur_python3
|
||||||
push_node: build_node
|
push_node: build_node
|
||||||
- docker push newsblur/newsblur_node
|
- docker push newsblur/newsblur_node
|
||||||
push_monitor: build_monitor
|
push_monitor: build_monitor
|
||||||
- docker push newsblur/newsblur_monitor
|
- docker push newsblur/newsblur_monitor
|
||||||
push_images: push_web push_node push_monitor
|
push_deploy: build_deploy
|
||||||
|
- docker push newsblur/newsblur_deploy
|
||||||
|
push_images: push_web push_node push_monitor push_deploy
|
||||||
push: build push_images
|
push: build push_images
|
||||||
|
|
||||||
# Tasks
|
# Tasks
|
||||||
|
|
11
docker/newsblur_deploy.Dockerfile
Normal file
11
docker/newsblur_deploy.Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
FROM newsblur/newsblur_python3
|
||||||
|
ENV DOCKERBUILD=True
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
RUN apt install -y curl
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
||||||
|
RUN apt install -y nodejs build-essential
|
||||||
|
RUN npm -g install yuglify
|
||||||
|
|
||||||
|
WORKDIR /srv/newsblur
|
||||||
|
CMD python manage.py collectstatic --no-input
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [[ -z "${TEST}" && "${TEST}" = "True" ]]
|
if [[ -z "${TEST}" && "${TEST}" = "True" ]]
|
||||||
then echo "starting test env"
|
then echo " ---> Starting test env"
|
||||||
else python3 manage.py check_db; gunicorn -c config/gunicorn_conf.py newsblur_web.wsgi:application
|
else python3 manage.py check_db; gunicorn -c config/gunicorn_conf.py newsblur_web.wsgi:application
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -796,8 +796,8 @@ with open(os.path.join(ROOT_DIR, 'assets.yml')) as stream:
|
||||||
PIPELINE = {
|
PIPELINE = {
|
||||||
'PIPELINE_ENABLED': True,
|
'PIPELINE_ENABLED': True,
|
||||||
'PIPELINE_ROOT': NEWSBLUR_DIR,
|
'PIPELINE_ROOT': NEWSBLUR_DIR,
|
||||||
'CSS_COMPRESSOR': 'pipeline.compressors.NoopCompressor',
|
'CSS_COMPRESSOR': 'pipeline.compressors.yuglify.YuglifyCompressor',
|
||||||
'JS_COMPRESSOR': 'pipeline.compressors.NoopCompressor',
|
'JS_COMPRESSOR': 'pipeline.compressors.yuglify.YuglifyCompressor',
|
||||||
'JAVASCRIPT': {
|
'JAVASCRIPT': {
|
||||||
'common': {
|
'common': {
|
||||||
'source_filenames': assets['javascripts']['common'],
|
'source_filenames': assets['javascripts']['common'],
|
||||||
|
@ -818,9 +818,9 @@ PIPELINE = {
|
||||||
'blurblog': {
|
'blurblog': {
|
||||||
'source_filenames': assets['javascripts']['blurblog'],
|
'source_filenames': assets['javascripts']['blurblog'],
|
||||||
'output_filename': 'js/blurblog.js',
|
'output_filename': 'js/blurblog.js',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'STYLESHEETS': {
|
'STYLESHEETS': {
|
||||||
},
|
|
||||||
'common': {
|
'common': {
|
||||||
'source_filenames': assets['stylesheets']['common'],
|
'source_filenames': assets['stylesheets']['common'],
|
||||||
'output_filename': 'css/common.css',
|
'output_filename': 'css/common.css',
|
||||||
|
|
Loading…
Add table
Reference in a new issue