Skip to content

Commit

Permalink
chore: deploy scheme ready
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopr committed May 18, 2023
1 parent 2a4c2ba commit e6a42cd
Show file tree
Hide file tree
Showing 17 changed files with 20,566 additions and 18,560 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
.env
flower


# Folders
.yarn
.venv
node_modules
__pycache__
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
5 changes: 1 addition & 4 deletions apps/client/src/lib/api.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import axios from "axios";

export const api = axios.create({
baseURL:
typeof window === "undefined"
? "http://server:3002/api/v1"
: "http://localhost:3002/api/v1"
baseURL: process.env.NEXT_PUBLIC_BACKEND_URL
});
5 changes: 0 additions & 5 deletions apps/server/.dockerignore

This file was deleted.

46 changes: 0 additions & 46 deletions apps/server/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion apps/server/server/celery.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Create a Celery instance
from celery import Celery


celery = Celery(
"visualdynamics",
broker="redis://localhost:6379/0",
Expand Down
6 changes: 5 additions & 1 deletion apps/server/server/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

class Config(object):
SECRET_KEY = os.environ.get("VISUAL_DYNAMICS_SECRET_KEY")
UPLOAD_FOLDER = os.path.abspath("/VDfiles")
UPLOAD_FOLDER = (
os.path.abspath(os.path.join(basedir, "../../..", "VDfiles"))
if os.environ.get("FLASK_DEBUG")
else os.path.abspath(os.path.join(os.path.expanduser("~"), "VDfiles"))
)
STATIC_FOLDER = os.path.abspath(os.path.join(basedir, "static"))
MDP_LOCATION_FOLDER = os.path.abspath(os.path.join(STATIC_FOLDER, "mdp"))
SOCK_SERVER_OPTIONS = {"ping_interval": 25}
2 changes: 1 addition & 1 deletion apps/server/server/resources/run/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def post(self):

args = parser.parse_args()

url = "VDWEB:3001"
url = "localhost:3001"

# Get absolute path to run folder
folder = os.path.abspath(args["folder"])
Expand Down
21 changes: 1 addition & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,10 @@ services:
build:
context: ./apps/client
target: builder
networks:
- def
depends_on:
- database
ports:
- "3001:3001"
server:
container_name: VDSRV
restart: always
build:
context: ./apps/server
target: runner
depends_on:
- mq
networks:
- def
volumes:
- $HOME/VDfiles:/VDfiles
ports:
- "3002:3002"
volumes:
mq:
driver: local
networks:
def:
driver: bridge
driver: local
2 changes: 1 addition & 1 deletion ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
apps: [
{
name: "server",
script: "poetry run flask run --host=0.0.0.0 --port=8081",
script: "poetry run flask run --host=0.0.0.0 --port=3002",
cwd: "./apps/server",
autorestart: true,
watch: false,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"private": true,
"scripts": {
"storybook": "yarn client storybook",

"client": "yarn workspace client",
"server": "yarn workspace server",

"dev": "concurrently --kill-others \"yarn:client dev\" \"yarn:server dev\""
},
"prisma": {
"schema": "apps/client/prisma/schema.prisma"
},
"workspaces": ["apps/*"],
"workspaces": [
"apps/*"
],
"keywords": [],
"author": "",
"license": "ISC",
Expand Down

0 comments on commit e6a42cd

Please sign in to comment.