mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-18 13:09:08 +02:00
Simplify sqkserver docker (#327)
* Simplify sqkserver docker by copying entire repository to image * Got flask templates working without custom root path * Remove unused comment in setup.py
This commit is contained in:
parent
5c4bfbc076
commit
287d0f34ca
3 changed files with 10 additions and 8 deletions
|
|
@ -19,12 +19,14 @@ WORKDIR /app
|
|||
RUN git clone https://github.com/googleapis/googleapis.git
|
||||
|
||||
# Copy the source code.
|
||||
COPY squeakserver ./squeakserver
|
||||
COPY proto ./proto
|
||||
COPY setup.py setup.cfg MANIFEST.in README.md ./
|
||||
COPY . ./
|
||||
|
||||
# COPY proto files
|
||||
RUN cp -r proto/ squeakserver/proto
|
||||
|
||||
# Copy the frontend build
|
||||
COPY frontend/squeak-node-frontend/build/ ./static/build
|
||||
RUN mkdir ./static && \
|
||||
cp -r frontend/squeak-node-frontend/build/ ./static/build
|
||||
|
||||
RUN python3 setup.py install
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ logger = logging.getLogger(__name__)
|
|||
def create_app(handler, username, password):
|
||||
# create and configure the app
|
||||
logger.info("Starting flask app from directory: {}".format(os.getcwd()))
|
||||
root_path = 'squeakserver/admin/webapp'
|
||||
# root_path = 'squeakserver/admin/webapp'
|
||||
# root_path = os.path.dirname(os.path.realpath(__file__))
|
||||
logger.info("Starting flask with root_path: {}".format(root_path))
|
||||
#logger.info("Starting flask with root_path: {}".format(root_path))
|
||||
# readme = open("README.md", "r").read()
|
||||
# logger.info("Starting flask with README: {}".format(readme))
|
||||
# base_template = open("squeakserver/admin/webapp/templates/base.html", "r").read()
|
||||
|
|
@ -39,8 +39,8 @@ def create_app(handler, username, password):
|
|||
__name__,
|
||||
static_folder='/app/static/build',
|
||||
static_url_path='/',
|
||||
template_folder='templates',
|
||||
root_path=root_path,
|
||||
# template_folder='templates',
|
||||
# root_path=root_path,
|
||||
)
|
||||
app.config.from_mapping(
|
||||
SECRET_KEY='dev',
|
||||
|
|
|
|||
0
squeakserver/proto/__init__.py
Normal file
0
squeakserver/proto/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue