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

[REF] prepare compose.neurosynth.org #294

Merged
merged 18 commits into from
Jun 1, 2022
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: synth
working-directory: compose
steps:
-
name: Checkout
Expand Down Expand Up @@ -105,22 +105,22 @@ jobs:
AUTH0_AUTH_URL: ${{ secrets.AUTH0_AUTH_URL }}
run: |
docker-compose run \
-e "APP_SETTINGS=neurosynth.config.DockerTestConfig" \
-e "APP_SETTINGS=neurosynth_compose.config.DockerTestConfig" \
-e "AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}" \
-e "AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET}" \
-e "AUTH0_BASE_URL=${AUTH0_BASE_URL}" \
-e "AUTH0_ACCESS_TOKEN_URL=${AUTH0_ACCESS_TOKEN_URL}" \
-e "AUTH0_AUTH_URL=${AUTH0_AUTH_URL}" \
--rm -w /neurosynth \
neurosynth \
python -m pytest neurosynth/tests
python -m pytest neurosynth_compose/tests
-
name: Frontend Configuration
run: |
cd neurosynth-frontend/ && \
cp .env.example .env.dev && \
docker-compose run \
-e "APP_SETTINGS=neurosynth.config.DockerTestConfig" \
-e "APP_SETTINGS=neurosynth_compose.config.DockerTestConfig" \
-e "AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}" \
-e "AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET}" \
-e "AUTH0_BASE_URL=${AUTH0_BASE_URL}" \
Expand All @@ -140,7 +140,7 @@ jobs:
name: Build Frontend
run: |
docker-compose run \
-e "APP_SETTINGS=neurosynth.config.DockerTestConfig" \
-e "APP_SETTINGS=neurosynth_compose.config.DockerTestConfig" \
-e "AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}" \
-e "AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET}" \
-e "AUTH0_BASE_URL=${AUTH0_BASE_URL}" \
Expand All @@ -167,7 +167,7 @@ jobs:
REACT_APP_AUTH0_CLIENT_ID: ${{ secrets.REACT_APP_AUTH0_CLIENT_ID }}
run: |
docker-compose run \
-e "APP_SETTINGS=neurosynth.config.DockerTestConfig" \
-e "APP_SETTINGS=neurosynth_compose.config.DockerTestConfig" \
-e "AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}" \
-e "AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET}" \
-e "AUTH0_BASE_URL=${AUTH0_BASE_URL}" \
Expand Down Expand Up @@ -198,5 +198,5 @@ jobs:
pip install flake8
cd ./store
flake8 ./neurostore
cd ../synth
flake8 ./neurosynth
cd ../compose
flake8 ./neurosynth_compose
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
url = https://github.com/neurostuff/neurostore-spec

[submodule "synth/neurosynth/openapi"]
path = synth/neurosynth/openapi
path = compose/neurosynth_compose/openapi
url = https://github.com/neurostuff/neurostore-spec
[submodule "synth/neurosynth-frontend/src/neurostore-typescript-sdk"]
path = synth/neurosynth-frontend/src/neurostore-typescript-sdk
path = compose/neurosynth-frontend/src/neurostore-typescript-sdk
url = https://github.com/neurostuff/neurostore-typescript-sdk.git
[submodule "synth/neurosynth-frontend/src/neurosynth-compose-typescript-sdk"]
path = synth/neurosynth-frontend/src/neurosynth-compose-typescript-sdk
path = compose/neurosynth-frontend/src/neurosynth-compose-typescript-sdk
url = https://github.com/neurostuff/neurosynth-compose-typescript-sdk.git
6 changes: 3 additions & 3 deletions synth/.env.example → compose/.env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
APP_SETTINGS=neurosynth.config.DevelopmentConfig
APP_SETTINGS=neurosynth_compose.config.DevelopmentConfig
FLASK_APP=manage
COMPOSE_CONVERT_WINDOWS_PATHS=1
POSTGRES_HOST=synth_pgsql
POSTGRES_PASSWORD=example
BEARERINFO_FUNC=neurosynth.resources.auth.decode_token
BEARERINFO_FUNC=neurosynth_compose.resources.auth.decode_token
AUTH0_CLIENT_ID=YOUR_CLIENT_ID
AUTH0_CLIENT_SECRET=YOUR_CLIENT_SECRET
V_HOST=localhost
V_HOST=localhost
File renamed without changes.
11 changes: 11 additions & 0 deletions compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "2"
services:
nginx:
ports:
- "81:80"

neurosynth:
expose:
- "8000"
command: /usr/local/bin/gunicorn -w 2 -b :8000 neurosynth_compose.core:app --log-level debug --timeout 300 --reload
restart: "no"
8 changes: 4 additions & 4 deletions synth/docker-compose.yml → compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ version: "2"
services:
neurosynth:
restart: always
build: ./neurosynth
build: ./neurosynth_compose
expose:
- "8000"
volumes:
- ./postgres/migrations:/migrations
- ./:/neurosynth
command: /usr/local/bin/gunicorn -w 2 -b :8000 neurosynth.core:app --log-level debug --timeout 120
command: /usr/local/bin/gunicorn -w 2 -b :8000 neurosynth_compose.core:app --log-level debug --timeout 120
env_file:
- .env
container_name: neurosynth
container_name: neurosynth_compose

nginx:
restart: always
Expand Down Expand Up @@ -42,4 +42,4 @@ volumes:
networks:
default:
external:
name: nginx-proxy
name: nginx-proxy
6 changes: 3 additions & 3 deletions synth/manage.py → compose/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import click
from flask_migrate import Migrate

from neurosynth.core import app, db
from neurosynth import models
from neurosynth.ingest import neurostore as ingest_nstore
from neurosynth_compose.core import app, db
from neurosynth_compose import models
from neurosynth_compose.ingest import neurostore as ingest_nstore

app.config.from_object(os.environ["APP_SETTINGS"])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
"scripts": {
"start:dev": "env-cmd -f .env.dev react-scripts start",
"start:staging": "env-cmd -f .env.staging react-scripts start",
"start:prod": "env-cmd -f .env.prod react-scripts start",
"build:dev": "env-cmd -f .env.dev react-scripts build",
"build:staging": "env-cmd -f .env.staging react-scripts build",
"build:prod": "env-cmd -f .env.prod react-scripts build",
"test": "react-scripts test",
"test-with-coverage": "npm run test -- --coverage --watchAll=false",
"cy:e2e-headless": "cypress run",
Expand Down
Loading