Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up remaining Bootstrap 3 code #501

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ backup/**
container_data
.cache
node_modules
OpenOversight/app/static/dist/*
1 change: 0 additions & 1 deletion DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ For more details about the S3 and AWS settings, see above. Please raise an issue
1. `dc run --rm web flask make-admin-user`
1. `dc run --rm web flask add-department "Seattle Police Department" "SPD"`
1. `dc run --rm web flask bulk-add-officers /data/init_data.csv`
1. `dc run --rm web npm run-script build`

# Data ingestion

Expand Down
10 changes: 0 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# node layer to build static assets
FROM node:22 AS nodejs
WORKDIR /usr/src/app/
COPY package.json yarn.lock ./
RUN yarn install
COPY OpenOversight/app/static/ OpenOversight/app/static/
RUN yarn build


FROM python:3.12.5-slim as base
ARG IS_PROD
ENV DEBIAN_FRONTEND noninteractive
Expand Down Expand Up @@ -42,7 +33,6 @@ RUN if [ "$IS_PROD" = "true" ]; then \
# Setup application
COPY create_db.py .
COPY OpenOversight OpenOversight
COPY --from=nodejs /usr/src/app/OpenOversight/app/static/dist/ OpenOversight/app/static/dist/

CMD if [ "$IS_PROD" = "true" ]; then \
gunicorn -w 4 -b 0.0.0.0:3000 OpenOversight.app:app; \
Expand Down
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ build_with_version: create_empty_secret
docker-compose build --build-arg MAKE_PYTHON_VERSION=$(PYTHON_VERSION)

.PHONY: test_with_version
test_with_version: build_with_version assets
ENV=testing docker-compose run --rm web pytest --cov=OpenOversight --cov-report xml:OpenOversight/tests/coverage.xml --doctest-modules -n 4 --dist=loadfile -v OpenOversight/tests/
test_with_version: build_with_version
touch OpenOversight/tests/coverage.xml
docker compose run --rm web-test pytest --cov=OpenOversight --cov-report xml:OpenOversight/tests/coverage.xml --doctest-modules -n 4 --dist=loadfile -v OpenOversight/tests/

.PHONY: start
start: build ## Run containers
Expand All @@ -28,10 +29,6 @@ create_db: start
## Creating database
docker-compose run --rm web python ../create_db.py

.PHONY: assets
assets:
docker-compose run --rm web yarn build

.PHONY: dev
dev: create_empty_secret build start create_db populate

Expand Down Expand Up @@ -61,17 +58,13 @@ test: start ## Run tests
lint:
docker-compose run --no-deps --rm web /bin/bash -c 'flake8; mypy app --config="../mypy.ini"'

.PHONY: clean_assets
clean_assets:
rm -rf ./OpenOversight/app/static/dist/

.PHONY: stop
stop: ## Stop containers
docker-compose stop

.PHONY: clean
clean: clean_assets stop ## Remove containers
docker-compose rm -f
docker compose rm -f

.PHONY: clean_all
clean_all: clean stop ## Wipe database
Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading