2021-07-27 08:45:17 +00:00
|
|
|
version: "2.3"
|
2019-02-19 14:51:34 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
data:
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
test_unit:
|
2022-02-07 11:46:51 +00:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile
|
2019-02-19 14:51:34 +00:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
|
|
|
user: node
|
2019-10-23 12:22:37 +00:00
|
|
|
command: npm run test:unit:app
|
2022-02-07 11:46:51 +00:00
|
|
|
working_dir: /overleaf/services/web
|
2020-08-11 12:20:23 +00:00
|
|
|
environment:
|
2021-07-20 09:26:03 +00:00
|
|
|
BASE_CONFIG:
|
|
|
|
SHARELATEX_CONFIG:
|
2020-08-11 12:20:23 +00:00
|
|
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
2019-02-19 14:51:34 +00:00
|
|
|
|
|
|
|
test_acceptance:
|
2022-02-07 11:46:51 +00:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile
|
2019-02-19 14:51:34 +00:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
2022-01-06 15:02:36 +00:00
|
|
|
working_dir: /overleaf/services/web
|
2021-07-27 08:45:17 +00:00
|
|
|
env_file: docker-compose.common.env
|
2019-02-19 14:51:34 +00:00
|
|
|
environment:
|
2021-07-20 09:26:03 +00:00
|
|
|
BASE_CONFIG:
|
2019-10-23 12:22:37 +00:00
|
|
|
SHARELATEX_CONFIG:
|
2020-12-02 10:16:16 +00:00
|
|
|
extra_hosts:
|
|
|
|
- 'www.overleaf.test:127.0.0.1'
|
2019-10-23 12:22:37 +00:00
|
|
|
command: npm run test:acceptance:app
|
2019-02-19 14:51:34 +00:00
|
|
|
user: root
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
- mongo
|
2021-07-27 08:45:17 +00:00
|
|
|
- saml
|
|
|
|
- ldap
|
2019-02-19 14:51:34 +00:00
|
|
|
|
2020-07-09 13:56:33 +00:00
|
|
|
test_karma:
|
2019-02-19 14:51:34 +00:00
|
|
|
build:
|
2022-02-07 11:46:51 +00:00
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile.frontend.ci
|
2019-02-25 13:18:42 +00:00
|
|
|
args:
|
|
|
|
PROJECT_NAME: $PROJECT_NAME
|
|
|
|
BRANCH_NAME: $BRANCH_NAME
|
|
|
|
BUILD_NUMBER: $BUILD_NUMBER
|
2022-01-06 15:02:36 +00:00
|
|
|
working_dir: /overleaf/services/web
|
2020-07-09 13:56:33 +00:00
|
|
|
command: npm run test:karma:single
|
|
|
|
user: node
|
2020-08-11 12:20:23 +00:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
2020-07-09 13:56:33 +00:00
|
|
|
|
|
|
|
test_frontend:
|
2022-02-07 11:46:51 +00:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile
|
2020-07-09 13:56:33 +00:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
2019-02-25 13:18:42 +00:00
|
|
|
user: node
|
2022-02-07 11:46:51 +00:00
|
|
|
working_dir: /overleaf/services/web
|
2020-07-09 13:56:33 +00:00
|
|
|
command: npm run test:frontend
|
2020-08-11 12:20:23 +00:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
2019-02-19 14:51:34 +00:00
|
|
|
|
2022-03-30 09:49:41 +00:00
|
|
|
test_frontend_ct:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./Dockerfile.frontend_ct
|
|
|
|
args:
|
|
|
|
PROJECT_NAME: $PROJECT_NAME
|
|
|
|
BRANCH_NAME: $BRANCH_NAME
|
|
|
|
BUILD_NUMBER: $BUILD_NUMBER
|
|
|
|
CYPRESS_IMAGE: $CYPRESS_IMAGE
|
|
|
|
working_dir: /overleaf/services/web
|
2022-07-29 08:18:50 +00:00
|
|
|
entrypoint: bash
|
|
|
|
volumes:
|
|
|
|
- ./cypress/results:/overleaf/services/web/cypress/results/
|
2022-03-30 09:49:41 +00:00
|
|
|
command:
|
2022-07-29 08:18:50 +00:00
|
|
|
- "-c"
|
|
|
|
- "if npm run cypress:run-ct; then exit 0; else mkdir -p ./cypress/results && touch ./cypress/results/.cypress_fail; fi;"
|
2022-03-30 09:49:41 +00:00
|
|
|
|
2019-02-19 14:51:34 +00:00
|
|
|
tar:
|
2020-07-02 15:51:38 +00:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER-webpack
|
2019-02-19 14:51:34 +00:00
|
|
|
volumes:
|
|
|
|
- ./:/tmp/build/
|
2020-05-22 10:34:57 +00:00
|
|
|
command: tar -cf /tmp/build/build.tar public/
|
2019-02-19 14:51:34 +00:00
|
|
|
user: root
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
|
|
|
|
mongo:
|
2022-09-01 15:32:43 +00:00
|
|
|
image: mongo:4.4.16
|
2021-07-27 08:45:17 +00:00
|
|
|
|
|
|
|
ldap:
|
|
|
|
restart: always
|
|
|
|
image: rroemhild/test-openldap:1.1
|
2022-02-15 13:37:13 +00:00
|
|
|
# Workaround large memory allocation (using the max-open-files-limit as socket buffer scale).
|
|
|
|
# REF: https://github.com/moby/moby/issues/8231#issuecomment-63877553
|
|
|
|
# REF: https://github.com/moby/moby/issues/8231#issuecomment-63871343
|
|
|
|
command:
|
|
|
|
- 'bash'
|
|
|
|
- '-c'
|
|
|
|
- 'ulimit -n 1024 && exec bash /run.sh'
|
2021-07-27 08:45:17 +00:00
|
|
|
|
|
|
|
saml:
|
|
|
|
restart: always
|
|
|
|
image: gcr.io/overleaf-ops/saml-test
|
|
|
|
environment:
|
|
|
|
SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
|
|
|
|
SAML_TEST_SP_ENTITY_ID: 'sharelatex-test-saml'
|
2022-08-09 12:03:30 +00:00
|
|
|
SAML_TEST_SP_LOCATION: 'http://www.overleaf.test:23000/saml/callback'
|