Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
release: python manage.py migrate
web: poetry run gunicorn metaculus_web.wsgi:application --workers 8 --bind 0.0.0.0:8000 &; cd front_end && npm run start -- -p 3000
dramatiq: poetry run python3 manage.py rundramatiq --processes 8 --threads 16
django_cron: poetry run python3 manage.py cron
4 changes: 0 additions & 4 deletions front_end/.husky/pre-push

This file was deleted.

3 changes: 3 additions & 0 deletions front_end/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ const nextConfig = {
destination: `${API_BASE_URL}/static/debug_toolbar/:path*`,
},
],
eslint: {
ignoreDuringBuilds: true
}
};

export default withNextIntl(nextConfig);
10 changes: 5 additions & 5 deletions front_end/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions front_end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"lint": "run-p lint:*",
"lint:js": "next lint",
"lint:types": "tsc",
"format": "prettier \"src/**/**.{js,jsx,ts,tsx}\" --write",
"prepare": "cd .. && husky ./front_end/.husky"
"format": "prettier \"src/**/**.{js,jsx,ts,tsx}\" --write"
},
"dependencies": {
"@floating-ui/react": "^0.26.16",
Expand Down Expand Up @@ -57,12 +56,12 @@
},
"devDependencies": {
"@types/d3": "^7.4.3",
"@types/lodash": "^4.17.4",
"@types/lodash": "^4.17.7",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-slider": "^1.3.6",
"eslint": "^8",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
Expand Down
12 changes: 7 additions & 5 deletions metaculus_web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
"SECRET_KEY", "django-insecure-47@xwq5$pn*^d(2233!+41#=-)53&@iz)*t@foixp(ov2e7r)t"
)

# SECURITY WARNING: don't run with debug turned on in production!
# TODO: disable in prod
DEBUG = os.environ.get("DEBUG", "true").lower() == "true"
DEBUG = os.environ.get("DEBUG", "False").lower() == "true"

# Application definition

Expand All @@ -55,7 +53,6 @@
"django_dramatiq",
"admin_auto_filters",
# TODO: disable in prod
"debug_toolbar",
# first-party:
"migrator",
"misc",
Expand All @@ -70,19 +67,24 @@
"fab_management",
]


MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"debug_toolbar.middleware.DebugToolbarMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"utils.middlewares.middleware_alpha_access_check",
]

if DEBUG:
INSTALLED_APPS += ["debug_toolbar"]
MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"]


# Cors configuration
CORS_ORIGIN_WHITELIST = [
"http://127.0.0.1:3000",
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "metaculus-web",
"version": "0.1.0",
"scripts": {
"install": "NODE_ENV=dev npm install --prefix front_end",
"buld": "npm --prefix front_end run build",
"OLD_heroku-postbuild": "TERM=xterm-256color curl -L https://github.com/elisescu/tty-share/releases/download/v2.4.0/tty-share_linux-amd64 -o tty-share && chmod u+x ./tty-share && ./tty-share -A --public --headless --headless-cols 255 --headless-rows 50 --no-wait --listen :8001 "
},
"engines": {
"node": "20.x"
}
}