$ pip3 install poetry
$ python3 -m venv .venv
$ source .venv/bin/activate
$ poetry install
$ make
# make dev-run
├── coding_test.ipynb
├── candidate-dist
│ ├── candidate.coding_test.zip`
│ ├── candidate.slu01.zip
│ ├── candidate.slu02.zip
| └── candidate.slu03.zip
├── profiles/id-card
│ ├── user_1
│ | └── file_2
├── applications
│ ├── coding_test
│ | └── user_1
| │ ├── file_1
| │ └── file_2
│ ├── slu01
│ | └── user_1
| │ └── file_1
│ ├── slu02
│ | ├── user_1
| │ | ├── file_1
| │ | ├── file_2
| │ | └── file_3
│ | └── user_2
| │ └── file_1
│ └── slu03
│ └── user_1
| └── file_1
└── payments
├── payment_proof
│ ├── user_1
│ | ├── file_1
| | └── file_2
| └── user_2
│ └── file_1
└── student_id
└── user_1
└── file_1
- DB details (host, port, user, pw) are taken from the environment
- It would be nice to be able to query the database without going through the service
- Read permission required
- Write permission required
- Bucket name is taken from the environment
These must be ran on the instance.
Create Admin User:
$ cd app/adm_portal
$ python manage.py create_admin --email admin@lisbondatascience.org --password
Create Staff User:
$ cd app/adm_portal
$ python manage.py create_staff --email staff@lisbondatascience.org --password
(Currently using python3.8-buster
instead of python3.8-alpine
because of postgresql dependency psycopg2
)
Building and Pushing new docker image on green commits on master
-
DJANGO_SETTINGS_MODULE
:adm_portal.settings.prod
-
DJANGO_SECRET_KEY
: secret, can be generated -
POSTGRES_NAME
: dependent on the createdAWS RDS
instance -
POSTGRES_USER
: dependent on the createdAWS RDS
instance -
POSTGRES_PASSWORD
: dependent on the createdAWS RDS
instance -
POSTGRES_HOST
: dependent on the createdAWS RDS
instance -
POSTGRES_PORT
: dependent on the createdAWS RDS
instance -
ELASTIC_EMAIL_API_KEY
: provided by us -
ELASTIC_EMAIL_SENDER
: provided by us -
S3_BUCKET_NAME
: dependent on the createdS3 Bucket
name -
ADM_GRADER_URL
: dependent on the AWS LAMBDA (for now it can be provided by us) -
ADM_GRADER_AUTH_TOKEN
: secret, can be generated, needs to be consistent with the one on the AWS LAMBDA
- SSH access?
- logs on cloudwatch?
- take secrets (for example
ADM_GRADER_AUTH_TOKEN
) from AWS SECRETS MANAGER - Deal with admin/staff creation on deploy (how to manage secrets?)