Skip to content
Open
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DEBUG=True
REAL_DATABASE_URL="..." # for `fab pull_db` to work
DATABASE_URL="postgres://postgres@localhost/star"
DATABASE_URL="postgres://postgres:postgres@db/star"
SECRET_KEY=nsPna8hFnaNIn32aasd0a21ldM
PYTHONUNBUFFERED=True
TANGO_API_URL="https://sandbox.tangocard.com/raas/v1/"
Expand All @@ -11,3 +11,4 @@ AWS_BUCKET_TEMPLATE="%s.yourname.stargeo.io"
BIOPORTAL_API_KEY="o239hfnsf-2311-mmas-19204oifna0"
FROM_EMAIL="no-reply@stargeo.org"
ADMIN="Admin Name:admin.email@gmail.com"
BROKER_URL="redis://redis:6379/0"
14 changes: 6 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
release:
name: Build and release image to Docker Hub
runs-on: ubuntu-latest
env:
BUILD_IMAGE: bedasoftware/stargeo:latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
Expand All @@ -16,11 +18,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.prod
push: true
tags: bedasoftware/stargeo:latest
platforms: linux/amd64,linux/arm64
- run: >-
docker buildx build --platform linux/arm64,linux/amd64
-f Dockerfile.prod
--push -t ${{ env.BUILD_IMAGE }} .
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ frontend/npm-debug.log
.ropeproject
*bundle.js
public

.python-version
4 changes: 2 additions & 2 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:2.7-slim
FROM python:3.6.9-slim
# Install R and its meta package
RUN apt-get update && apt-get install -y --no-install-recommends \
r-base-core r-base-dev \
Expand All @@ -11,7 +11,7 @@ RUN mkdir -p /app/user /app/logs
WORKDIR /app/user
RUN pip install --upgrade pip
ADD requirements.txt /app/user/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --exists-action=s -r requirements.txt
# Add code
ADD . /app/user
EXPOSE 8000
9 changes: 5 additions & 4 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: stargeo-prod
services:
db:
image: postgres:9.4
Expand All @@ -6,9 +7,9 @@ services:
- POSTGRES_PASSWORD
healthcheck:
test: [ "CMD", "pg_isready", "-U", "${PGUSER:-postgres}" ]
interval: 5s
timeout: 5s
retries: 5
interval: 1s
timeout: 10s
retries: 50

redis:
image: redis:3
Expand All @@ -29,7 +30,7 @@ services:
redis:
condition: service_healthy
ports:
- "8000:8000"
- "8001:8000"
env_file: .env.prod

celery:
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ flake8>=3.5.0
flake8-print
flake8-per-file-ignores
pep8-naming
pytest==2.6.4
pytest~=2.9
pytest-django==3.1.2
lxml
cssselect
Expand Down
64 changes: 64 additions & 0 deletions requirements.freezed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
amqp==1.4.9
anyjson==0.3.3
asn1crypto==0.24.0
bcrypt==3.1.4
billiard==3.3.0.23
biopython==1.68
boto==2.38.0
celery==3.1.17
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
coreapi==2.3.3
coreschema==0.0.4
cryptography==2.3.1
dj-database-url==0.4.2
Django==1.11.10
django-cacheops==4.0.5
django-datatable-view-compat==0.8.2
django-filter==1.1.0
django-jinja==2.4.1
django-jinja-bootstrap-form==4.0.3
django-pandas==0.4.5
django-registration==2.0.4
django-rest-swagger==2.1.1
djangorestframework==3.5.3
easydict==1.7
Fabric3==1.13.1.post1
ftptool==0.7.1
funcy==1.11
gunicorn==19.7.1
handy==0.7
honcho==0.6.4
idna==2.6
itypes==1.1.0
Jinja2==2.10
kombu==3.0.37
MarkupSafe==1.0
mygene==3.0.0
numexpr==2.6.2
numpy==1.14.1
oauthlib==2.1.0
openapi-codec==1.3.2
pandas==0.22.0
paramiko==2.4.2
patsy==0.5.0
pkg-resources==0.0.0
psycopg2==2.7.3.2
pyasn1==0.4.4
pycparser==2.19
PyNaCl==1.3.0
python-dateutil==2.7.3
pytz==2018.5
redis==2.10.6
requests==2.18.4
requests-oauthlib==0.8.0
rpy2==2.9.2
scipy==1.0.0
simplejson==3.16.0
six==1.11.0
statsmodels==0.8.0
termcolor==1.1.0
tqdm==4.19.5
uritemplate==3.0.0
urllib3==1.22
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tqdm==4.19.5
requests==2.18.4
ftptool==0.7.1
django-cacheops==4.0.5
pandas==0.22
pandas==0.22.0
termcolor==1.1.0
numpy==1.16.1
numexpr==2.6.2 # There is an issue with newer version
Expand All @@ -34,6 +34,6 @@ django-datatable-view-compat==0.8.2
boto==2.38.0
rpy2==2.8.6
django-registration==2.0.4
biopython==1.68
biopython==1.76
mygene==3.0.0
requests-oauthlib==0.8.0