Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
52fd3b11
Commit
52fd3b11
authored
Oct 10, 2019
by
jornh
Committed by
Tamika Tannis
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize docker (#300)
parent
5a90e8a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
19 deletions
+25
-19
wsgi.py
amundsen_application/wsgi.py
+2
-2
local.Dockerfile
local.Dockerfile
+11
-7
public.Dockerfile
public.Dockerfile
+12
-10
No files found.
amundsen_application/wsgi.py
View file @
52fd3b11
import
os
import
os
from
amundsen_application
import
create_app
from
amundsen_application
import
create_app
app
=
create_app
(
app
lication
=
create_app
(
config_module_class
=
os
.
getenv
(
'FRONTEND_SVC_CONFIG_MODULE_CLASS'
)
or
config_module_class
=
os
.
getenv
(
'FRONTEND_SVC_CONFIG_MODULE_CLASS'
)
or
'amundsen_application.config.LocalConfig'
)
'amundsen_application.config.LocalConfig'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
.
run
(
host
=
'0.0.0.0'
)
app
lication
.
run
(
host
=
'0.0.0.0'
)
local.Dockerfile
View file @
52fd3b11
ARG METADATASERVICE_BASE
ARG METADATASERVICE_BASE
ARG SEARCHSERVICE_BASE
ARG SEARCHSERVICE_BASE
FROM node:8 as node-stage
FROM node:8-slim as node-stage
COPY . /app
WORKDIR /app/amundsen_application/static
WORKDIR /app/amundsen_application/static
COPY amundsen_application/static/package.json /app/amundsen_application/static/package.json
COPY amundsen_application/static/package-lock.json /app/amundsen_application/static/package-lock.json
RUN npm install
RUN npm install
COPY amundsen_application/static/ /app/amundsen_application/static/
RUN npm rebuild node-sass
RUN npm rebuild node-sass
RUN npm run dev-build
RUN npm run dev-build
FROM python:3
COPY . /app
COPY --from=node-stage /app /app
FROM python:3-slim
WORKDIR /app
WORKDIR /app
COPY requirements3.txt /app/requirements3.txt
RUN pip3 install -r requirements3.txt
RUN pip3 install -r requirements3.txt
COPY --from=node-stage /app /app
RUN python3 setup.py install
RUN python3 setup.py install
ENTRYPOINT [ "python3" ]
ENTRYPOINT [ "python3" ]
...
...
public.Dockerfile
View file @
52fd3b11
FROM node:8 as node-stage
FROM node:8-slim as node-stage
COPY . /app
WORKDIR /app/amundsen_application/static
WORKDIR /app/amundsen_application/static
COPY amundsen_application/static/package.json /app/amundsen_application/static/package.json
COPY amundsen_application/static/package-lock.json /app/amundsen_application/static/package-lock.json
RUN npm install
RUN npm install
RUN npm run build
FROM python:3
COPY --from=node-stage /app /app
COPY amundsen_application/static /app/amundsen_application/static
RUN npm run build
FROM python:3-slim
WORKDIR /app
WORKDIR /app
RUN pip3 install gunicorn
COPY requirements3.txt /app/requirements3.txt
RUN pip3 install -r requirements3.txt
RUN pip3 install -r requirements3.txt
COPY --from=node-stage /app /app
COPY . /app
RUN python3 setup.py install
RUN python3 setup.py install
ENTRYPOINT [ "python3" ]
CMD [ "python3", "amundsen_application/wsgi.py" ]
CMD [ "amundsen_application/wsgi.py" ]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment