-
Notifications
You must be signed in to change notification settings - Fork 23
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 #54 from shankari/create_prod_docker_compose
Create production containers with all code copied in instead of mounted
- Loading branch information
Showing
8 changed files
with
141 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: "3" | ||
services: | ||
dashboard: | ||
image: em-pub-dash-prod/frontend | ||
build: | ||
context: frontend | ||
dockerfile: docker/Dockerfile | ||
depends_on: | ||
- db | ||
ports: | ||
# DASH in numbers | ||
- "3274:8080" | ||
volumes: | ||
- ./plots:/public/plots | ||
networks: | ||
- emission | ||
notebook-server: | ||
image: em-pub-dash-prod/viz-scripts | ||
build: | ||
context: viz_scripts | ||
dockerfile: docker/Dockerfile | ||
depends_on: | ||
- db | ||
environment: | ||
- DB_HOST=db | ||
- WEB_SERVER_HOST=0.0.0.0 | ||
- CRON_MODE=TRUE | ||
- STUDY_CONFIG=stage-program | ||
ports: | ||
# ipynb in numbers | ||
- "47962:8888" | ||
networks: | ||
- emission | ||
volumes: | ||
- ./plots:/plots | ||
db: | ||
image: mongo:4.4.0 | ||
volumes: | ||
- mongo-data:/data/db | ||
networks: | ||
- emission | ||
|
||
networks: | ||
emission: | ||
|
||
volumes: | ||
mongo-data: | ||
|
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM danjellz/http-server:1.4 | ||
|
||
VOLUME /plots | ||
|
||
RUN mkdir -p /public | ||
COPY ../client /public/client | ||
COPY ../*.html /public |
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# python 3 | ||
FROM emission/e-mission-server.dev.server-only:4.0.0 | ||
ARG SERVER_REPO=https://github.com/aGuttman/e-mission-server.git | ||
ARG SERVER_BRANCH=dashboard-dependencies | ||
|
||
VOLUME /plots | ||
|
||
ADD docker/environment36.dashboard.additions.yml / | ||
|
||
RUN /bin/bash -c "/clone_server.sh" | ||
|
||
WORKDIR /usr/src/app | ||
|
||
RUN /bin/bash -c "cd e-mission-server && source setup/activate.sh && conda env update --name emission --file setup/environment36.notebook.additions.yml" | ||
RUN /bin/bash -c "cd e-mission-server && source setup/activate.sh && conda env update --name emission --file /environment36.dashboard.additions.yml" | ||
|
||
ADD docker/start_notebook.sh /usr/src/app/start_notebook.sh | ||
RUN chmod u+x /usr/src/app/start_notebook.sh | ||
|
||
ADD docker/crontab /usr/src/app/crontab | ||
|
||
EXPOSE 8888 | ||
|
||
CMD ["/bin/bash", "/usr/src/app/start_notebook.sh"] |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
0 7 * * * python bin/update_mappings.py mapping_dictionaries.ipynb >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py mode_purpose_share.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py ebike_specific_metrics.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py generic_metrics.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py generic_timeseries.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py mode_specific_metrics.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py mode_specific_timeseries.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py energy_calculations.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py generic_metrics_ebike_project.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
0 8 * * * python bin/generate_plots.py timeseries_analysis.ipynb default >> /var/log/intake.stdinout 2>&1 | ||
# For testing only | ||
# */5 * * * * python bin/generate_plots.py mode_purpose_share.ipynb default >> /var/log/intake.stdinout 2>&1 |