Skip to content

Commit d86c114

Browse files
authored
Merge pull request #234 from hydroserver2/v2-deployment
HydroServer V1
2 parents ea6dd0c + 6f42621 commit d86c114

File tree

442 files changed

+32769
-408210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

442 files changed

+32769
-408210
lines changed

.coveragerc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.ebextensions/django.config

Lines changed: 0 additions & 5 deletions
This file was deleted.

.env.example

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
1-
# The base URL for the deployment.
2-
PROXY_BASE_URL = http://127.0.0.1:8000
3-
APP_CLIENT_URL = http://127.0.0.1:5173 # In production environments, this should generally be the same as the PROXY_BASE_URL.
4-
ALLOWED_HOSTS = 127.0.0.1,localhost
5-
61
# Deployment Settings
7-
SECRET_KEY = # This is required by Django. Keep this value secret.
8-
DEBUG = True # This should be set to False in production environments.
9-
DEPLOYMENT_BACKEND = aws # Use 'aws' for AWS deployments, otherwise use 'local'
10-
DISABLE_ACCOUNT_CREATION = False # Set this to True if you want administrative users to manage the creation of all other user accounts.
11-
12-
# The connection URL so the timescaleDB instance can connect to the PostgreSQL database
13-
DATABASE_URL = postgresql://postgres:password@localhost:5432/tsdb # Update this value to connect to your PostgreSQL database for this deployment.
14-
15-
# Email Settings. This email is used for user account verification and password reset.
16-
EMAIL_HOST =
17-
EMAIL_PORT =
18-
EMAIL_HOST_USER =
19-
EMAIL_HOST_PASSWORD =
20-
ADMIN_EMAIL =
21-
22-
# OAuth Settings. Leave these settings blank to disable any of these services.
23-
OAUTH_GOOGLE_CLIENT =
24-
OAUTH_GOOGLE_SECRET =
25-
OAUTH_ORCID_CLIENT =
26-
OAUTH_ORCID_SECRET =
27-
OAUTH_HYDROSHARE_CLIENT =
28-
OAUTH_HYDROSHARE_SECRET =
2+
3+
PROXY_BASE_URL = # The base URL HydroServer will be served from.
4+
ALLOWED_HOSTS = # Defaults to the host of PROXY_BASE_URL.
5+
DEBUG = # True/False: This should be set to False in production environments.
6+
DEPLOYMENT_BACKEND = # Use 'aws' or 'gcp' for cloud deployments, otherwise use 'local'.
7+
SECRET_KEY = # This is required by Django. Keep this value secret.
8+
DEFAULT_SUPERUSER_EMAIL = # The email of the admin user created during initial startup.
9+
DEFAULT_SUPERUSER_PASSWORD = # The password of the admin user created during initial startup.
10+
ENABLE_AUDITS = # True/False: This will track user activity in the sta app.
11+
12+
13+
# Account Settings
14+
15+
SMTP_URL = # A connection to the SMTP server Django will send account related emails from.
16+
DEFAULT_FROM_EMAIL = # The email address Django will send account related emails from.
17+
ACCOUNT_SIGNUP_ENABLED = # True/False: Controls whether new users can create their own accounts.
18+
ACCOUNT_OWNERSHIP_ENABLED = # True/False: Controls whether new users can create/own workspaces.
19+
SOCIALACCOUNT_SIGNUP_ONLY = # True/False: Controls whether non-social account creation is supported.
20+
21+
22+
# Database Settings
23+
24+
DATABASE_URL = # A connection to the PostgreSQL or TimescaleDB server HydroServer will use.
25+
CONN_MAX_AGE = # Controls how long Django will hold database connections open before closing them.
26+
CONN_HEALTH_CHECKS = # True/False: Controls whether connection health checks are enabled.
27+
SSL_REQUIRED = # True/False: Controls whether Django will connect to the database using SSL.
28+
29+
30+
# Storage Settings
31+
32+
MEDIA_BUCKET_NAME = # The name of the AWS or GCP bucket photos will be stored in.
33+
STATIC_BUCKET_NAME = # The name of the AWS or GCP bucket static files will be stored in.
34+
APP_CLIENT_URL = # The base URL media and static files will be served from, if not the PROXY_BASE_URL.
35+
AWS_CLOUDFRONT_KEY = # The AWS CloudFront key used to generate signed photo URLs.
36+
AWS_CLOUDFRONT_KEY_ID = # The ID of the AWS CloudFront key used to generate signed photo URLs.
37+
GS_PROJECT_ID = # The ID of the GCP project HydroServer is deployed to.

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Push HydroServer Docker Image to GHCR
22

33
on:
44
release:
5-
types: [created]
5+
types: [created, edited]
66

77
jobs:
88
build:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@
33
.pytest_cache
44
__pycache__/
55
db.sqlite3
6+
/static/
7+
!*/static/
8+
/media/
69
staticfiles/
10+
/static
11+
!/static/**/
712
*.db
813
*test.ipynb
914
*test.yaml
1015
**/launch.json
1116
.coverage
1217
coverage.txt
1318
photos/
19+
csrf_test.py
1420

1521
# Elastic Beanstalk Files
1622
.elasticbeanstalk/*

.platform/hooks/postdeploy/01_migrate.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

.platform/hooks/postdeploy/02_timescale.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

.platform/hooks/postdeploy/03_collectstatic.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

.platform/nginx/conf.d/elasticbeanstalk/00_application.conf

Lines changed: 0 additions & 11 deletions
This file was deleted.

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ COPY . .
1111

1212
EXPOSE 8000
1313

14-
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "hydroserver.wsgi:application"]
14+
ENV WORKERS=3
15+
16+
CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:8000 --workers ${WORKERS} hydroserver.wsgi:application"]

0 commit comments

Comments
 (0)