-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from RENCI/deploy_upgrade
Deploy upgrade
- Loading branch information
Showing
4 changed files
with
30 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,40 +10,22 @@ | |
# gets the apsviz-ui-data repo | ||
# and runs main which starts the web server | ||
|
||
FROM renciorg/renci-python-image:v0.0.1 | ||
# leverage the renci python base image | ||
FROM python:3.9-slim | ||
|
||
# get some credit | ||
LABEL maintainer="[email protected]" | ||
|
||
# install basic tools | ||
RUN apt-get update | ||
|
||
# create log level env param (debug=10, info=20) | ||
ENV LOG_LEVEL 20 | ||
|
||
# make a directory for the repo | ||
RUN mkdir /repo | ||
|
||
# go to the directory where we are going to upload the repo | ||
WORKDIR /repo | ||
|
||
# get the latest code | ||
RUN git clone https://github.com/RENCI/apsviz-ui-data.git | ||
# create a new non-root user and switch to it | ||
RUN useradd --create-home -u 1000 nru | ||
USER nru | ||
|
||
# go to the repo dir | ||
# Create the directory for the code and cd to it | ||
WORKDIR /repo/apsviz-ui-data | ||
|
||
# make sure everything is read/write in the repo code | ||
RUN chmod 777 -R . | ||
|
||
# install requirements | ||
# Copy in just the requirements first for caching purposes | ||
COPY requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# switch to the non-root user (nru). defined in the base image | ||
USER nru | ||
|
||
# expose the default port | ||
EXPOSE 4000 | ||
# Copy in the rest of the code | ||
COPY . . | ||
|
||
# start the service entry point | ||
ENTRYPOINT ["python", "main.py"] | ||
ENTRYPOINT ["python", "main.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters