2021-07-27 04:45:17 -04:00
|
|
|
version: "2.3"
|
2019-02-19 09:51:34 -05:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
data:
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
test_unit:
|
2022-02-07 06:46:51 -05:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile
|
2019-02-19 09:51:34 -05:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
|
|
|
user: node
|
2019-10-23 08:22:37 -04:00
|
|
|
command: npm run test:unit:app
|
2022-02-07 06:46:51 -05:00
|
|
|
working_dir: /overleaf/services/web
|
2020-08-11 08:20:23 -04:00
|
|
|
environment:
|
2021-07-20 05:26:03 -04:00
|
|
|
BASE_CONFIG:
|
2024-02-06 04:34:15 -05:00
|
|
|
OVERLEAF_CONFIG:
|
2020-08-11 08:20:23 -04:00
|
|
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
2019-02-19 09:51:34 -05:00
|
|
|
|
|
|
|
test_acceptance:
|
2022-02-07 06:46:51 -05:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile
|
2019-02-19 09:51:34 -05:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
2022-01-06 10:02:36 -05:00
|
|
|
working_dir: /overleaf/services/web
|
2021-07-27 04:45:17 -04:00
|
|
|
env_file: docker-compose.common.env
|
2019-02-19 09:51:34 -05:00
|
|
|
environment:
|
2021-07-20 05:26:03 -04:00
|
|
|
BASE_CONFIG:
|
2024-02-06 04:34:15 -05:00
|
|
|
OVERLEAF_CONFIG:
|
2020-12-02 05:16:16 -05:00
|
|
|
extra_hosts:
|
|
|
|
- 'www.overleaf.test:127.0.0.1'
|
2019-10-23 08:22:37 -04:00
|
|
|
command: npm run test:acceptance:app
|
2019-02-19 09:51:34 -05:00
|
|
|
user: root
|
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
- mongo
|
2021-07-27 04:45:17 -04:00
|
|
|
- saml
|
|
|
|
- ldap
|
2019-02-19 09:51:34 -05:00
|
|
|
|
2020-07-09 09:56:33 -04:00
|
|
|
test_frontend:
|
2022-02-07 06:46:51 -05:00
|
|
|
build:
|
|
|
|
context: ../..
|
|
|
|
dockerfile: services/web/Dockerfile
|
2020-07-09 09:56:33 -04:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
|
2019-02-25 08:18:42 -05:00
|
|
|
user: node
|
2022-02-07 06:46:51 -05:00
|
|
|
working_dir: /overleaf/services/web
|
2020-07-09 09:56:33 -04:00
|
|
|
command: npm run test:frontend
|
2020-08-11 08:20:23 -04:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: "--unhandled-rejections=strict"
|
2019-02-19 09:51:34 -05:00
|
|
|
|
2022-03-30 05:49:41 -04: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 04:18:50 -04:00
|
|
|
entrypoint: bash
|
2023-03-20 06:14:49 -04:00
|
|
|
environment:
|
|
|
|
CYPRESS_SPEC_PATTERN: ${CYPRESS_SPEC_PATTERN:-}
|
2023-05-10 07:32:13 -04:00
|
|
|
CYPRESS_EXCLUDE_SPEC_PATTERN: ${CYPRESS_EXCLUDE_SPEC_PATTERN:-}
|
2022-07-29 04:18:50 -04:00
|
|
|
volumes:
|
2023-03-20 06:14:49 -04:00
|
|
|
- ${CYPRESS_RESULTS:-./cypress/results}:/overleaf/services/web/cypress/results/
|
2022-03-30 05:49:41 -04:00
|
|
|
command:
|
2022-07-29 04:18:50 -04: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 05:49:41 -04:00
|
|
|
|
2019-02-19 09:51:34 -05:00
|
|
|
tar:
|
2020-07-02 11:51:38 -04:00
|
|
|
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER-webpack
|
2019-02-19 09:51:34 -05:00
|
|
|
volumes:
|
|
|
|
- ./:/tmp/build/
|
2020-05-22 06:34:57 -04:00
|
|
|
command: tar -cf /tmp/build/build.tar public/
|
2019-02-19 09:51:34 -05:00
|
|
|
user: root
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
|
|
|
|
mongo:
|
2023-06-01 03:21:10 -04:00
|
|
|
image: mongo:5.0.17
|
2023-04-18 07:15:34 -04:00
|
|
|
command: --replSet overleaf
|
2021-07-27 04:45:17 -04:00
|
|
|
|
|
|
|
ldap:
|
|
|
|
image: rroemhild/test-openldap:1.1
|
2022-02-15 08:37:13 -05: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 04:45:17 -04:00
|
|
|
|
|
|
|
saml:
|
2023-11-29 03:56:02 -05:00
|
|
|
image: us-east1-docker.pkg.dev/overleaf-ops/ol-docker/saml-test
|
2021-07-27 04:45:17 -04:00
|
|
|
environment:
|
|
|
|
SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
|
2024-02-06 04:34:15 -05:00
|
|
|
SAML_TEST_SP_ENTITY_ID: 'overleaf-test-saml'
|
2022-08-09 08:03:30 -04:00
|
|
|
SAML_TEST_SP_LOCATION: 'http://www.overleaf.test:23000/saml/callback'
|