Skip to content

Commit

Permalink
Merge pull request #156 from icefoganalytics/test
Browse files Browse the repository at this point in the history
CSL Audit and others
  • Loading branch information
datajohnson authored Sep 26, 2023
2 parents 9d4dee4 + 89561d7 commit 42d400f
Show file tree
Hide file tree
Showing 15 changed files with 1,100 additions and 1,168 deletions.
2 changes: 1 addition & 1 deletion db/4_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4024,7 +4024,7 @@ BEGIN
INNER JOIN sfa.disbursement d ON a.id = d.assessment_id
INNER JOIN sfa.person p ON p.id = s.person_id
LEFT JOIN sfa.person_address pa ON pa.person_id = p.id AND pa.id = app.primary_address_id
LEFT JOIN sfa.msfaa m ON s.id = m.student_id
LEFT JOIN sfa.msfaa m ON app.id = m.application_id
WHERE fr.request_type_id IN (4, 5)
AND d.csl_cert_seq_number = @CSL_CERT_SEQ_P
AND d.issue_date >= @FROM_DATE_P AND d.issue_date <= @TO_DATE_P
Expand Down
78 changes: 5 additions & 73 deletions docker-compose.development.yaml
Original file line number Diff line number Diff line change
@@ -1,75 +1,18 @@
version: "3.8"

x-default-environment: &default-environment
NODE_ENV: development
DB_NAME: SFADB_DEV
DB_HOST: db
DB_USER: sa
DB_PASS: &default-db-password Testing1122
DB_PORT: 1433
DB_DEFAULT_SCHEMA: sfa
API_PORT: ${API_PORT:-3000}
BASE_URL: "http://localhost:${API_PORT:-3000}"
AWS_S3_ENDPOINT: http://s3:9000

services:
api:
build:
context: ./src/api
dockerfile: development.Dockerfile
env_file:
- ./src/api/.env.development
environment:
<<: *default-environment
tty: true
ports:
- "${API_PORT:-3000}:${API_PORT:-3000}"
volumes:
- ./src/api:/usr/src/api
depends_on:
db:
condition: service_healthy

test:
build:
context: ./src/api
dockerfile: development.Dockerfile
command: /bin/true
env_file:
- ./src/api/.env.development
environment:
<<: *default-environment
NODE_ENV: test
DB_NAME: sfa_client_test
DB_DEFAULT_SCHEMA: sfa
tty: true
volumes:
- ./src/api:/usr/src/api
depends_on:
db:
condition: service_healthy
db:
build:
context: .
dockerfile: ./db/db.Dockerfile
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- "1433:1433"
user: root
environment:
MSSQL_SA_PASSWORD: *default-db-password
ACCEPT_EULA: "Y"
env_file:
- db/sqlserver.env
- db/sapassword.env
volumes:
- ./db/bin:/usr/src/db/bin
- ./db/initializers:/usr/src/db/initializers
- db_data:/var/opt/mssql/data
- ./db/data:/var/opt/mssql/data
- ./db/log:/var/opt/mssql/log
- ./db/backups:/var/opt/mssql/data/backups
healthcheck: # https://github.com/Microsoft/mssql-docker/issues/133
test: "/opt/mssql-tools/bin/sqlcmd -U sa -P \"$$MSSQL_SA_PASSWORD\" -Q \"SELECT 1\" || exit 1"
interval: 5s
timeout: 10s
retries: 3
start_period: 5s
s3:
image: "minio/minio:latest"
ports:
Expand All @@ -89,16 +32,5 @@ services:
- 8081:8080
- 8085:8085

# For easily generating large PlantUML diagrams
# Not relevant to production environment.
# Accessible at http://localhost:9999
plantuml:
image: plantuml/plantuml-server:jetty
ports:
- 9999:8080
environment:
PLANTUML_LIMIT_SIZE: 8192

volumes:
db_data:
s3storage:
12 changes: 0 additions & 12 deletions docker-compose.test.yaml

This file was deleted.

38 changes: 33 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
version: "3"
version: "3.8"

services:
web:
build: .
restart: unless-stopped
db:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 3000:3000
- "1433:1433"
user: root
env_file:
- db/sqlserver.env
- db/sapassword.env
volumes:
- ./db/data:/var/opt/mssql/data
- ./db/log:/var/opt/mssql/log
- ./db/backups:/var/opt/mssql/data/backups
s3:
image: "minio/minio:latest"
ports:
- "9000:9000"
- "9090:9090"
environment:
MINIO_ROOT_USER: "root"
MINIO_ROOT_PASSWORD: "password"
volumes:
- "s3storage:/data/minio"
command: minio server /data/minio --console-address ":9090"

email:
image: marcopas/docker-mailslurper
ports:
- 2500:2500
- 8081:8080
- 8085:8085

volumes:
s3storage:
Loading

0 comments on commit 42d400f

Please sign in to comment.