Skip to content

Commit 6684483

Browse files
authored
[ BB2-1452 ] Finishing changes before publish (#33)
* Update bb2-dev readme w/ test.pypi info * Add INSTALL_FROM_TEST_PYPI build argument * Change arg to BUILD_DEVELOPMENT
1 parent 113320f commit 6684483

File tree

3 files changed

+46
-10
lines changed

3 files changed

+46
-10
lines changed

README-bb2-dev.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,33 @@ Note: You may need to clean up already existing Docker containers, if you are ha
3030

3131
## Visual trouble shoot
3232

33-
Install VNC viewer and point browser to http://localhost:5900 to monitor web UI interactions
33+
Install VNC viewer and point browser to http://localhost:5900 to monitor web UI interactions
34+
35+
## Installing cms-bluebutton-sdk from test.pypi.org
36+
37+
The package can be installed from the test instance of the PyPI site for development testing. The default behavior is to install from the main site.
38+
39+
To utilize the test.pypi.org repository use the following commands:
40+
41+
To create and start the containers:
42+
43+
```
44+
BUILD_DEVELOPMENT="True" docker-compose up -d
45+
```
46+
47+
To build just the `server` container:
48+
49+
```
50+
BUILD_DEVELOPMENT="True" docker-compose up -d --build server
51+
```
52+
OR
53+
```
54+
docker-compose build server --build-arg BUILD_DEVELOPMENT="True"
55+
```
56+
57+
To show the version installed:
58+
59+
```
60+
docker-compose exec server pip show cms-bluebutton-sdk
61+
```
62+

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ services:
55
build:
66
context: ./server
77
dockerfile: ./Dockerfile
8+
args:
9+
BUILD_DEVELOPMENT: ${BUILD_DEVELOPMENT}
810
ports:
911
- "3001:3001"
1012
- "5678:5678"
@@ -15,4 +17,4 @@ services:
1517
context: ./client
1618
dockerfile: ./Dockerfile
1719
ports:
18-
- "3000:3000"
20+
- "3000:3000"

server/Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
FROM python:3.9.6
22

3-
LABEL version="1.0"
3+
ARG BUILD_DEVELOPMENT="False"
4+
5+
LABEL version="1.0.0"
46
LABEL description="Demo of a Medicare claims data sample app"
57

68
WORKDIR /server
79

8-
# COPY ["./src/configs/sample_config.py", "./src/configs/config.py"]
9-
# COPY ["./src/prestart/env/sandbox.sample.env","./src/prestart/env/development.env"]
10-
1110
COPY . .
1211

13-
RUN pip install pipenv debugpy ./cms_bluebutton_sdk-1.0.0-py3-none-any.whl
14-
RUN pipenv install --system --deploy --ignore-pipfile
12+
RUN pip install pipenv debugpy
1513

16-
# ENV ENV "development"
14+
# Install cms_bluebutton_sdk from pypi.org or test.pypi.org
15+
RUN if [ "$BUILD_DEVELOPMENT" = "True" ]; then \
16+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ cms-bluebutton-sdk; \
17+
else \
18+
pip install cms-bluebutton-sdk; \
19+
fi
20+
21+
RUN pipenv install --system --deploy --ignore-pipfile
1722

1823
EXPOSE 3001
1924

20-
CMD ["sh", "-c", "python -m debugpy --listen 0.0.0.0:5678 app.py"]
25+
CMD ["sh", "-c", "python -m debugpy --listen 0.0.0.0:5678 app.py"]

0 commit comments

Comments
 (0)