-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
to run use: ```bash $ cd e2e $ docker-compose build $ docker-compose up ```
- Loading branch information
Showing
7 changed files
with
139 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.git | ||
.github | ||
.env | ||
.mypy_cache | ||
.pytest_cache | ||
.vscode | ||
*.egg-info | ||
__pycache__ | ||
dist | ||
env | ||
node_modules | ||
client | ||
e2e/node_modules | ||
e2e/server/env | ||
server/env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
version: "3.8" | ||
|
||
services: | ||
elastic: | ||
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 | ||
environment: | ||
- discovery.type=single-node | ||
networks: | ||
- e2e | ||
tmpfs: | ||
- /usr/share/elasticsearch/data | ||
|
||
redis: | ||
image: redis:alpine | ||
networks: | ||
- e2e | ||
|
||
mongo: | ||
image: mongo:4 | ||
networks: | ||
- e2e | ||
tmpfs: | ||
- /data/db | ||
|
||
server: | ||
build: | ||
context: ../ | ||
dockerfile: e2e/server/Dockerfile | ||
ports: | ||
- "5000:5000" | ||
networks: | ||
- e2e | ||
depends_on: | ||
- redis | ||
- mongo | ||
- elastic | ||
environment: | ||
- WEB_CONCURRENCY=2 | ||
- WEBPACK_MANIFEST_PATH=/opt/client-dist/manifest.json | ||
- MONGO_URI=mongodb://mongo/superdesk | ||
- ARCHIVED_MONGO_URI=mongodb://mongo/superdesk | ||
- CONTENTAPI_MONGO_URI=mongodb://mongo/superdesk_capi | ||
- PUBLICAPI_MONGO_URI=mongodb://mongo/superdesk_papi | ||
- LEGAL_ARCHIVE_URI=mongodb://mongo/superdesk_legal | ||
- ARCHIVED_URI=mongodb://mongo/superdesk_archive | ||
- ELASTICSEARCH_URL=http://elastic:9200 | ||
- ELASTICSEARCH_INDEX=superdesk_e2e | ||
- CELERY_BROKER_URL=redis://redis:6379/1 | ||
- REDIS_URL=redis://redis:6379/1 | ||
- DEFAULT_TIMEZONE=Europe/Prague | ||
- SECRET_KEY=e2e | ||
|
||
networks: | ||
e2e: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 python3-dev python3-pip python3-venv git gcc curl \ | ||
# lxml | ||
libxml2-dev libxslt-dev \ | ||
# PIL | ||
libjpeg-dev zlib1g-dev \ | ||
# magic | ||
libmagic-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# setup venv | ||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN python3 -m venv "$VIRTUAL_ENV" | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
ENV PYTHONUNBUFFERED=1 | ||
ENV C_FORCE_ROOT=False | ||
ENV CELERYBEAT_SCHEDULE_FILENAME=/tmp/celerybeatschedule.db | ||
ENV TZ=Europe/London | ||
|
||
# update venv | ||
RUN python3 -m pip install -U pip wheel setuptools | ||
|
||
# install core requirements | ||
WORKDIR /tmp | ||
COPY e2e/server/core-requirements.txt . | ||
RUN python3 -m pip install -Ur core-requirements.txt | ||
|
||
# install server | ||
WORKDIR /opt/superdesk/ | ||
COPY . . | ||
|
||
# go to e2e server | ||
WORKDIR /opt/superdesk/e2e/server | ||
|
||
RUN python3 -m pip install -Ur requirements.txt | ||
|
||
ENTRYPOINT [ "/opt/superdesk/e2e/server/docker/start.sh" ] | ||
CMD ["honcho", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gunicorn==19.7.1 | ||
honcho==1.0.1 | ||
git+https://github.com/superdesk/superdesk-core.git@develop#egg=superdesk-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
cd /opt/superdesk/e2e/server | ||
|
||
# wait for elastic to be up | ||
printf 'waiting for elastic.' | ||
until $(curl --output /dev/null --silent --head --fail "${ELASTICSEARCH_URL}"); do | ||
printf '.' | ||
sleep .5 | ||
done | ||
echo 'done.' | ||
|
||
# init dbs | ||
honcho run python3 manage.py app:initialize_data | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
gunicorn==19.7.1 | ||
honcho==1.0.1 | ||
git+https://github.com/superdesk/superdesk-core.git@develop#egg=superdesk-core | ||
-e ../../ | ||
-r ./core-requirements.txt | ||
-e ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters