Skip to content

Commit

Permalink
Merge pull request #8 from uwcirg/connectathon-refactor
Browse files Browse the repository at this point in the history
Connectathon refactor
  • Loading branch information
daniellrgn authored Jan 3, 2024
2 parents 04c2db4 + e1dbedf commit f068cce
Show file tree
Hide file tree
Showing 64 changed files with 17,346 additions and 2,733 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
node_modules
/build
/.svelte-kit
.vscode
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
src/lib/config.ts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ cp default.env .env
Starting the docker container

```bash
docker-compose build && docker-compose up -d
docker-compose build && docker-compose up --detach
```
36 changes: 35 additions & 1 deletion default.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# Default docker-compose environment file; copy to .env and modify as necessary
# `docker-compose` must be run in the same directory as this file
# https://docs.docker.com/compose/environment-variables/#the-env-file
# environmental variables for interpolation in docker-compose YAML files

# https://docs.docker.com/compose/reference/envvars/#compose_project_name
# Containers started with the below value will have their names prefixed with it
# Choose something unique to the docker host, eg ${INSTANCE_ID}-dev-${USER}
COMPOSE_PROJECT_NAME=

# Port to expose to internet; use in SERVER_NAME (portal.env)
# EXTERNAL_PORT=
# EXTERNAL_PORT=

# Enable to use dynamic ingress overrides
# COMPOSE_FILE=docker-compose.yaml:docker-compose.traefik-ingress.yaml

# Enable to use static ingress overrides
COMPOSE_FILE=docker-compose.yaml:docker-compose.static-ingress.yaml

# Fully qualified domain name; used to configure ingress
# SERVER_NAME=foo.cirg.uw.edu

# Enable to use development overrides
# COMPOSE_FILE=docker-compose.yaml:docker-compose.dev.yaml

VITE_EPIC_CLIENT_ID=
VITE_CERNER_CLIENT_ID=

# SHL Server API endpoint url
VITE_API_BASE=

# SHL Viewer url
VITE_VIEWER_BASE=

# FHIR Server endpoint url
VITE_INTERMEDIATE_FHIR_SERVER_BASE=
6 changes: 6 additions & 0 deletions default.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# If overrides to .env values are needed for development
# VITE_API_BASE=
# VITE_INTERMEDIATE_FHIR_SERVER_BASE=

# Override vite dev server port
# DEV_SERVER_PORT=
8 changes: 8 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

version: "3.4"
services:
shlips:
command: npm run dev
volumes:
- ./src:/opt/app/src
- ./static:/opt/app/static
9 changes: 9 additions & 0 deletions docker-compose.static-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# docker-compose override to expose web container port (80) to local VM
# listens on the local VM at http://localhost:${EXTERNAL_PORT}
---
version: "3.9"
services:
shlips:
# Allow override of published port
ports:
- "127.0.0.1:${EXTERNAL_PORT:-3000}:3000"
20 changes: 20 additions & 0 deletions docker-compose.traefik-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# docker-compose ingress overrides for traefik
---
version: "3.9"
services:
shlips:
labels:
- traefik.enable=true
# Traefik will route requests with Host matching the SERVER_NAME environment variable (see .env)
- traefik.http.routers.shlips-${COMPOSE_PROJECT_NAME}.rule=Host(`${SERVER_NAME}`)

- traefik.http.routers.shlips-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.shlips-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.routers.shlips-${COMPOSE_PROJECT_NAME}.tls.certresolver=letsencrypt
networks:
- ingress
networks:
# ingress network
ingress:
name: external_web
external: "true"
6 changes: 1 addition & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
version: "3.4"
services:
shlips:
build: ./
ports:
- "127.0.0.1:${EXTERNAL_PORT:-3000}:3000"
env_file:
- .env
build: ./
Loading

0 comments on commit f068cce

Please sign in to comment.