Skip to content

Commit

Permalink
Merge pull request #61 from readthedocs/humitos/build-default-large
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos authored Jun 8, 2020
2 parents b459191 + a78d01b commit aa71156
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/entrypoints/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

../../docker/common.sh

CMD="python3 -m celery worker -A ${CELERY_APP_NAME}.worker -Ofair -c 2 -Q builder,celery,default,build01 -l DEBUG"
CMD="python3 -m celery worker -A ${CELERY_APP_NAME}.worker -Ofair -c 1 -Q builder,celery,default,build01,build:default,build:large -l DEBUG"

if [ -n "${DOCKER_NO_RELOAD}" ]; then
echo "Running Docker with no reload"
Expand Down
7 changes: 4 additions & 3 deletions dockerfiles/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@ def down(c, volumes=False):
c.run(f'{DOCKER_COMPOSE_COMMAND} down', pty=True)

@task
def up(c, no_search=False, init=False, no_reload=False):
def up(c, no_search=False, init=False, no_reload=False, scale_build=1):
"""Start all the docker containers for a Read the Docs instance"""
INIT = 'INIT='
DOCKER_NO_RELOAD = 'DOCKER_NO_RELOAD='
SCALE = f'--scale build={scale_build}'
if init:
INIT = 'INIT=t'
if no_reload:
DOCKER_NO_RELOAD = 'DOCKER_NO_RELOAD=t'

if no_search:
c.run(f'{INIT} {DOCKER_NO_RELOAD} docker-compose -f {DOCKER_COMPOSE} -f {DOCKER_COMPOSE_OVERRIDE} up', pty=True)
c.run(f'{INIT} {DOCKER_NO_RELOAD} docker-compose -f {DOCKER_COMPOSE} -f {DOCKER_COMPOSE_OVERRIDE} up {SCALE}', pty=True)
else:
c.run(f'{INIT} {DOCKER_NO_RELOAD} {DOCKER_COMPOSE_COMMAND} up', pty=True)
c.run(f'{INIT} {DOCKER_NO_RELOAD} {DOCKER_COMPOSE_COMMAND} up {SCALE}', pty=True)

@task
def shell(c, running=False, container='web'):
Expand Down

0 comments on commit aa71156

Please sign in to comment.