File tree Expand file tree Collapse file tree 6 files changed +42
-23
lines changed
Expand file tree Collapse file tree 6 files changed +42
-23
lines changed Original file line number Diff line number Diff line change 1- FROM ubuntu:21 .04
1+ FROM ubuntu:22 .04
22LABEL org.opencontainers.image.source https://github.com/biocompute-objects/bco_api
33ENV DEBIAN_FRONTEND=noninteractive
44
@@ -7,29 +7,27 @@ ENV DJANGO_SUPERUSER_PASSWORD="BioCompute123"
77ENV DJANGO_SUPERUSER_USERNAME="BioComputeSuperUser"
88ENV DJANGO_SUPERUSER_EMAIL=
"[email protected] " 99
10- RUN apt-get -qq update && apt-get install -y python3 python3-dev python3-pip
10+ RUN apt-get -qq update && apt-get install -y python3.9 python3-dev python3-pip
1111
12- RUN python3.9 -m pip install --upgrade pip
12+ RUN python3 -m pip install --upgrade pip
1313
1414WORKDIR /biocompute_api
1515
1616COPY requirements.txt .
17- COPY apitests.py .
18- COPY apitests_new.py .
1917
20- RUN python3.9 -m pip install -r requirements.txt
18+ RUN python3 -m pip install -r requirements.txt
2119
22- COPY admin_only ./admin_only
20+ # COPY admin_only ./admin_only
2321COPY bco_api ./bco_api
2422# COPY static ./static
25- COPY docs ./docs
23+ # COPY docs ./docs
2624
2725WORKDIR /biocompute_api/bco_api
2826
29- RUN python3.9 manage.py migrate
30- RUN python3.9 manage.py loaddata ./api/fixtures/metafixtures.json
31- RUN python3.9 manage.py createsuperuser --no-input
27+ RUN python3 manage.py migrate
28+ RUN python3 manage.py createsuperuser --no-input
3229
30+ EXPOSE 8000
3331# CMD ["bash"]
34- ENTRYPOINT ["python3.9 " , "manage.py" , "runserver" ]
32+ ENTRYPOINT ["python3" , "manage.py" , "runserver" ]
3533CMD ["0.0.0.0:8000" ]
Original file line number Diff line number Diff line change 11
2- erver {
2+ server {
33 listen 80;
44 server_name 161.253.252.154 test.portal.biochemistry.gwu.edu;
55 return 301 https://$host$request_uri;
Original file line number Diff line number Diff line change 9696 CORS_ORIGIN_ALLOW_ALL = True
9797
9898# Use the REST framework
99- # Source: https://www.django-rest-framework.org/api-guide/authentication/#setting-the-authentication-scheme
100- # Source: https://www.django-rest-framework.org/api-guide/permissions/#setting-the-permission-policy
10199REST_FRAMEWORK = {
102100 "DEFAULT_AUTHENTICATION_CLASSES" : [
103101 "rest_framework.authentication.TokenAuthentication"
200198DATABASES = {
201199 "default" : {
202200 "ENGINE" : "django.db.backends.sqlite3" ,
203- "NAME" : os . path . join ( BASE_DIR , "db.sqlite3" ) ,
201+ "NAME" : server_config [ "DATABASES" ][ "path" ] ,
204202 }
205203}
206204
268266 OBJECT_NAMING [i ] = server_config ["OBJECT_NAMING" ][i ]
269267
270268# emailing notifications
271-
272- # e-Mail settings are explained at https://stackoverflow.com/questions/46053085/django-gmail-smtp-error-please-run-connect-first
273269EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
274270EMAIL_HOST = "localhost"
275271EMAIL_PORT = 25
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ publishonly=False
2020[KEYS]
2121anon=627626823549f787c3ec763ff687169206626149
2222
23+ [DATABASES]
24+ # default settting
25+ path=./db.sqlite3
26+ # path=/Users/hadleyking/GitHub/biocompute-objects/dev/data/db.sqlite3
27+
2328# Which host names do you want to associate with the server?
2429# Note: the local hostname (i.e. 127.0.0.1) should come at the end.
2530[HOSTNAMES]
Original file line number Diff line number Diff line change 1+ # cat docker-compose.yml
2+
3+ version : ' 3.4'
4+
5+ services :
6+ bco-api :
7+ build : .
8+ # image: ghcr.io/biocompute-objects/bco_api:latest
9+ container_name : bco-api
10+ environment :
11+ TZ : ' America/New_York'
12+
13+ ports :
14+ - " 8000:8000"
15+ read_only : true
16+ tmpfs :
17+ - /tmp
18+ restart : unless-stopped
19+ stdin_open : true
20+ tty : true
21+
22+ # volumes:
23+ # - /Users/hadleyking/GitHub/biocompute-objects/dev/data/db.sqlite3:/biocompute_api/bco_api/db.sqlite3
24+ # - /Users/hadleyking/GitHub/biocompute-objects/dev/data/server.conf:/biocompute_api/bco_api/server.conf
25+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments