2020-02-19 04:55:06 +00:00
|
|
|
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
|
2023-03-21 23:41:59 +00:00
|
|
|
version: '3.8'
|
2020-02-19 04:55:06 +00:00
|
|
|
services:
|
|
|
|
|
2020-08-05 22:58:20 +00:00
|
|
|
fullstack-mysql:
|
2023-03-21 06:56:45 +00:00
|
|
|
image: "${IMAGE}:ci-${BUILD_NUMBER}"
|
2020-02-19 04:55:06 +00:00
|
|
|
environment:
|
2023-03-21 06:56:45 +00:00
|
|
|
DEBUG: 'true'
|
|
|
|
LE_STAGING: 'true'
|
2020-11-07 12:24:01 +00:00
|
|
|
FORCE_COLOR: 1
|
2023-03-21 06:56:45 +00:00
|
|
|
DB_MYSQL_HOST: 'db'
|
|
|
|
DB_MYSQL_PORT: '3306'
|
|
|
|
DB_MYSQL_USER: 'npm'
|
|
|
|
DB_MYSQL_PASSWORD: 'npm'
|
|
|
|
DB_MYSQL_NAME: 'npm'
|
2020-02-19 04:55:06 +00:00
|
|
|
volumes:
|
2024-01-09 00:25:10 +00:00
|
|
|
- npm_data_mysql:/data
|
2020-02-19 04:55:06 +00:00
|
|
|
expose:
|
|
|
|
- 81
|
|
|
|
- 80
|
|
|
|
- 443
|
|
|
|
depends_on:
|
|
|
|
- db
|
2021-08-22 23:28:59 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "/bin/check-health"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
2020-02-19 04:55:06 +00:00
|
|
|
|
2020-08-05 22:58:20 +00:00
|
|
|
fullstack-sqlite:
|
2023-03-21 06:56:45 +00:00
|
|
|
image: "${IMAGE}:ci-${BUILD_NUMBER}"
|
2020-08-05 22:58:20 +00:00
|
|
|
environment:
|
2023-03-21 06:56:45 +00:00
|
|
|
DEBUG: 'true'
|
|
|
|
LE_STAGING: 'true'
|
2020-11-07 12:24:01 +00:00
|
|
|
FORCE_COLOR: 1
|
2023-03-21 06:56:45 +00:00
|
|
|
DB_SQLITE_FILE: '/data/mydb.sqlite'
|
2023-03-29 23:04:37 +00:00
|
|
|
PUID: 1000
|
|
|
|
PGID: 1000
|
2023-05-08 22:19:09 +00:00
|
|
|
DISABLE_IPV6: 'true'
|
2020-08-05 22:58:20 +00:00
|
|
|
volumes:
|
2024-01-09 00:25:10 +00:00
|
|
|
- npm_data_sqlite:/data
|
2020-08-05 22:58:20 +00:00
|
|
|
expose:
|
|
|
|
- 81
|
|
|
|
- 80
|
|
|
|
- 443
|
2021-08-22 23:28:59 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "/bin/check-health"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 3s
|
2020-08-05 22:58:20 +00:00
|
|
|
|
2020-02-19 04:55:06 +00:00
|
|
|
db:
|
|
|
|
image: jc21/mariadb-aria
|
|
|
|
environment:
|
2023-03-21 06:56:45 +00:00
|
|
|
MYSQL_ROOT_PASSWORD: 'npm'
|
|
|
|
MYSQL_DATABASE: 'npm'
|
|
|
|
MYSQL_USER: 'npm'
|
|
|
|
MYSQL_PASSWORD: 'npm'
|
2020-02-19 04:55:06 +00:00
|
|
|
volumes:
|
2024-01-09 00:25:10 +00:00
|
|
|
- mysql_data:/var/lib/mysql
|
2020-02-19 04:55:06 +00:00
|
|
|
|
2020-08-06 01:26:37 +00:00
|
|
|
cypress-mysql:
|
2023-03-21 06:56:45 +00:00
|
|
|
image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
|
2020-02-19 04:55:06 +00:00
|
|
|
build:
|
2020-11-22 06:57:12 +00:00
|
|
|
context: ../test/
|
|
|
|
dockerfile: cypress/Dockerfile
|
2020-02-19 04:55:06 +00:00
|
|
|
environment:
|
2023-03-21 06:56:45 +00:00
|
|
|
CYPRESS_baseUrl: 'http://fullstack-mysql:81'
|
2020-08-06 01:26:37 +00:00
|
|
|
volumes:
|
2024-01-09 00:25:10 +00:00
|
|
|
- cypress_logs_mysql:/results
|
2020-08-06 01:26:37 +00:00
|
|
|
command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
|
|
|
|
|
|
|
|
cypress-sqlite:
|
2023-03-21 06:56:45 +00:00
|
|
|
image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
|
2020-08-06 01:26:37 +00:00
|
|
|
build:
|
2020-11-22 06:57:12 +00:00
|
|
|
context: ../test/
|
|
|
|
dockerfile: cypress/Dockerfile
|
2020-08-06 01:26:37 +00:00
|
|
|
environment:
|
|
|
|
CYPRESS_baseUrl: "http://fullstack-sqlite:81"
|
2020-02-19 04:55:06 +00:00
|
|
|
volumes:
|
2024-01-09 00:25:10 +00:00
|
|
|
- cypress_logs_sqlite:/results
|
2020-02-19 04:55:06 +00:00
|
|
|
command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
|
|
|
|
|
|
|
|
volumes:
|
2024-01-09 00:25:10 +00:00
|
|
|
cypress_logs_mysql:
|
|
|
|
cypress_logs_sqlite:
|
|
|
|
npm_data_mysql:
|
|
|
|
npm_data_sqlite:
|
|
|
|
mysql_data:
|