-
Notifications
You must be signed in to change notification settings - Fork 15
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 #79 from guzman-raphael/adjust-docker-envs
Add dev environment and update docs
- Loading branch information
Showing
8 changed files
with
106 additions
and
41 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,36 @@ | ||
# PHARUS_VERSION=$(cat pharus/version.py | tail -1 | awk -F\' '{print $2}') docker-compose -f docker-compose-deploy.yaml pull | ||
# PHARUS_VERSION=$(cat pharus/version.py | tail -1 | awk -F\' '{print $2}') docker-compose -f docker-compose-deploy.yaml up -d | ||
# Note: You must run both commands above | ||
# PHARUS_VERSION=0.1.0a5 docker-compose -f docker-compose-deploy.yaml pull | ||
# PHARUS_VERSION=0.1.0a5 docker-compose -f docker-compose-deploy.yaml up -d | ||
# | ||
# Intended for production deployment. | ||
# Note: You must run both commands above for minimal outage | ||
# Make sure to add an entry into your /etc/hosts file as `127.0.0.1 fakeservices.datajoint.io` | ||
# This serves as an alias for the domain to resolve locally. | ||
# With this config and the configuration below in NGINX, you should be able to verify it is | ||
# running properly with a `curl https://fakeservices.datajoint.io/api/version`. | ||
version: "2.4" | ||
x-net: &net | ||
networks: | ||
- main | ||
services: | ||
pharus: | ||
extends: | ||
file: ./docker-compose-base.yaml | ||
service: pharus | ||
<<: *net | ||
image: datajoint/pharus:${PHARUS_VERSION} | ||
# environment: # configurable values with defaults | ||
# - PHARUS_PORT=5000 | ||
# - PHARUS_PREFIX=/ | ||
fakeservices.datajoint.io: | ||
<<: *net | ||
image: raphaelguzman/nginx:v0.0.15 | ||
environment: | ||
- PHARUS_PORT=5000 | ||
- PHARUS_PREFIX=/now | ||
- ADD_pharus_TYPE=REST | ||
- ADD_pharus_ENDPOINT=pharus:5000 | ||
- ADD_pharus_PREFIX=/api | ||
- HTTPS_PASSTHRU=TRUE | ||
ports: | ||
- "5000:5000" | ||
- "443:443" | ||
- "80:80" | ||
depends_on: | ||
pharus: | ||
condition: service_healthy | ||
networks: | ||
main: |
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,39 @@ | ||
# PY_VER=3.8 IMAGE=djbase DISTRO=alpine PHARUS_VERSION=$(cat pharus/version.py | tail -1 | awk -F\' '{print $2}') HOST_UID=$(id -u) docker-compose -f docker-compose-dev.yaml up | ||
# | ||
# Intended for normal development. Supports hot/live reloading. | ||
# Note: If requirements or Dockerfile change, will need to add --build flag to docker-compose. | ||
# Make sure to add an entry into your /etc/hosts file as `127.0.0.1 fakeservices.datajoint.io` | ||
# This serves as an alias for the domain to resolve locally. | ||
# With this config and the configuration below in NGINX, you should be able to verify it is | ||
# running properly with a `curl https://fakeservices.datajoint.io/api/version`. | ||
version: "2.4" | ||
x-net: &net | ||
networks: | ||
- main | ||
services: | ||
pharus: | ||
<<: *net | ||
extends: | ||
file: ./docker-compose-build.yaml | ||
service: pharus | ||
environment: | ||
- FLASK_ENV=development # enables logging to console from Flask | ||
volumes: | ||
- ./pharus:/opt/conda/lib/python3.8/site-packages/pharus | ||
command: pharus | ||
fakeservices.datajoint.io: | ||
<<: *net | ||
image: raphaelguzman/nginx:v0.0.15 | ||
environment: | ||
- ADD_pharus_TYPE=REST | ||
- ADD_pharus_ENDPOINT=pharus:5000 | ||
- ADD_pharus_PREFIX=/api | ||
- HTTPS_PASSTHRU=TRUE | ||
ports: | ||
- "443:443" | ||
- "80:80" | ||
depends_on: | ||
pharus: | ||
condition: service_healthy | ||
networks: | ||
main: |
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