-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose-dev.yaml
56 lines (56 loc) · 1.89 KB
/
docker-compose-dev.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# PY_VER=3.9 IMAGE=djbase DISTRO=alpine PHARUS_VERSION=$(cat pharus/version.py | grep -oP '\d+\.\d+\.\d+') 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:
local-db:
<<: *net
image: datajoint/mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=pharus
volumes:
- ./tests/init/init.sql:/docker-entrypoint-initdb.d/init.sql
pharus:
<<: *net
extends:
file: ./docker-compose-build.yaml
service: pharus
environment:
- FLASK_ENV=development # enables logging to console from Flask
- PHARUS_SPEC_PATH=tests/init/test_dynamic_api_spec.yaml # for dynamic api spec
# --- only needed if you need OIDC compatability ---
- PHARUS_OIDC_CLIENT_SECRET
- PHARUS_OIDC_CLIENT_ID
- PHARUS_OIDC_REDIRECT_URI
- PHARUS_OIDC_CODE_VERIFIER
- PHARUS_OIDC_TOKEN_URL
- PHARUS_OIDC_PUBLIC_KEY
- PHARUS_OIDC_SUBJECT_KEY=preferred_username
volumes:
- ./pharus:/opt/conda/lib/python${PY_VER}/site-packages/pharus
command: pharus
fakeservices.datajoint.io:
<<: *net
image: datajoint/nginx:v0.2.3
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: