Skip to content

Commit

Permalink
Merge pull request #635 from RNAcentral/export-app
Browse files Browse the repository at this point in the history
Add microservice to export data
  • Loading branch information
carlosribas authored Oct 15, 2024
2 parents 7f47cf0 + b82026b commit bd81d32
Show file tree
Hide file tree
Showing 34 changed files with 179 additions and 1,415 deletions.
13 changes: 1 addition & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
stages:
# - test
# - build
- deploy

#test_image:
Expand All @@ -25,17 +24,6 @@ stages:
# python rnacentral/manage.py test portal
# python rnacentral/manage.py test sequence_search

#build_image:
# stage: build
# variables:
# DOCKER_USER: $DOCKER_USER
# DOCKER_PASSWORD: $DOCKER_PASSWORD
# before_script:
# - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
# script:
# - docker build -f Dockerfile -t rnacentral/rnacentral-webcode:${CI_COMMIT_BRANCH} .
# - docker push rnacentral/rnacentral-webcode:${CI_COMMIT_BRANCH}

deploy_image:
stage: deploy
image:
Expand All @@ -61,3 +49,4 @@ deploy_image:
# - rnacentral/*
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
when: manual

20 changes: 3 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,21 @@ RUN apt-get update && apt-get install -y \
curl \
tar \
git \
vim \
supervisor && \
vim && \
rm -rf /var/lib/apt/lists/*

ENV RNACENTRAL_LOCAL=/srv/rnacentral/local
ENV SUPERVISOR_CONF_DIR=/srv/rnacentral/supervisor
ARG LOCAL_DEVELOPMENT

# Create folders
RUN \
mkdir -p $RNACENTRAL_LOCAL && \
mkdir -p $SUPERVISOR_CONF_DIR && \
mkdir /srv/rnacentral/log && \
mkdir /srv/rnacentral/static

# Install Infernal and node.js
# Install node.js
RUN \
cd $RNACENTRAL_LOCAL && \
curl -OL http://eddylab.org/infernal/infernal-1.1.1.tar.gz && \
tar -xvzf infernal-1.1.1.tar.gz && \
cd infernal-1.1.1 && \
./configure --prefix=$RNACENTRAL_LOCAL/infernal-1.1.1 && \
make && \
make install && \
cd easel && \
make install && \
cd $RNACENTRAL_LOCAL && \
rm infernal-1.1.1.tar.gz && \
curl -sL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs

Expand Down Expand Up @@ -83,5 +70,4 @@ USER rnacentral
COPY ./entrypoint.sh $RNACENTRAL_HOME
ENTRYPOINT ["/srv/rnacentral/rnacentral-webcode/entrypoint.sh"]

# Supervisor
CMD [ "/bin/sh", "-c", "/usr/bin/supervisord -c ${SUPERVISOR_CONF_DIR}/supervisord.conf" ]
CMD ["gunicorn", "--chdir", "/srv/rnacentral/rnacentral-webcode/rnacentral", "--bind", "0.0.0.0:8000", "rnacentral.wsgi:application", "--workers", "4", "--timeout", "120", "--log-level=debug", "--access-logfile", "/dev/stdout", "--error-logfile", "/dev/stderr"]
58 changes: 0 additions & 58 deletions Dockerfile-local

This file was deleted.

9 changes: 0 additions & 9 deletions Dockerfile-rq

This file was deleted.

14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,10 @@ The [public postgres database](https://rnacentral.org/help/public-database) is c
If you want to use another database, add the following environment variables: `DB_HOST`, `DB_NAME`, `DB_USER`,
`DB_PASSWORD`, and `DB_PORT`.

3. For Mac OS users, install [mutagen](https://mutagen.io/) (Docker on Mac has some performance issues)
3. Run the app using [Docker](https://www.docker.com):

```
brew install mutagen-io/mutagen/mutagen-beta
```

4. Run the app using [Docker](https://www.docker.com):

```
For Linux users:
docker-compose -f docker-compose.local.yml up --build
For Mac OS users:
mutagen compose -f docker-compose.local.mac.yml up --build
docker-compose up --build
```

## Feedback
Expand Down
127 changes: 0 additions & 127 deletions docker-compose.local.mac.yml

This file was deleted.

100 changes: 0 additions & 100 deletions docker-compose.local.yml

This file was deleted.

Loading

0 comments on commit bd81d32

Please sign in to comment.