Skip to content

Commit

Permalink
Build webassets on docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
knrafto committed Sep 15, 2016
1 parent a953e66 commit 0df0ce1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Expand Up @@ -15,6 +15,8 @@ RUN pip3 install -r requirements.txt

ADD . .

RUN ./manage.py assets build

CMD nginx; gunicorn -b 0.0.0.0:5000 wsgi:app --workers 3

EXPOSE 5000
4 changes: 3 additions & 1 deletion manage.py
Expand Up @@ -3,6 +3,7 @@
import binascii
import unittest

from flask_assets import ManageAssets
from flask_rq import get_worker
from flask_script import Manager, Server, Command
from flask_script.commands import ShowUrls, Clean
Expand All @@ -11,7 +12,7 @@

from server import create_app, generate
from server.models import db, User, Course, Version
from server.extensions import cache
from server.extensions import assets_env, cache

# default to dev config
env = os.environ.get('OK_ENV', 'dev')
Expand All @@ -33,6 +34,7 @@ def run(self):
manager.add_command("clean", Clean())
manager.add_command('db', MigrateCommand)
manager.add_command('test', RunTests())
manager.add_command("assets", ManageAssets(assets_env))

@manager.shell
def make_shell_context():
Expand Down

0 comments on commit 0df0ce1

Please sign in to comment.