-
Notifications
You must be signed in to change notification settings - Fork 512
Expand file tree
/
Copy pathdocker-compose-e2e-tests.yml
More file actions
62 lines (59 loc) · 1.77 KB
/
docker-compose-e2e-tests.yml
File metadata and controls
62 lines (59 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# You can use this to run the e2e tests in a docker container running in frontend below
# To run:
# docker-compose -f docker-compose-e2e-tests.yml build
# docker-compose -f docker-compose-e2e-tests.yml up
version: '3'
services:
db:
image: docker.io/library/postgres:15-alpine
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: flagsmith
container_name: flagsmith_postgres
flagsmith-api:
image: ${API_IMAGE:-ghcr.io/flagsmith/flagsmith-api:dev}
build:
context: ../
target: oss-api
environment:
E2E_TEST_AUTH_TOKEN: some-token
ENABLE_FE_E2E: 'True'
DJANGO_ALLOWED_HOSTS: '*'
DATABASE_URL: postgresql://postgres:password@db:5432/flagsmith
DISABLE_ANALYTICS_FEATURES: 'true'
EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
ACCESS_LOG_LOCATION: /dev/shm/log.txt
ports:
- 8000:8000
depends_on:
- db
links:
- db:db
healthcheck:
test: "[ -e /dev/shm/log.txt ] && exit 0 || exit 1"
start_period: 60s
interval: 10s
timeout: 3s
retries: 30
frontend:
image: ${E2E_IMAGE:-ghcr.io/flagsmith/flagsmith-e2e:dev}
build:
context: ../
dockerfile: frontend/Dockerfile.e2e
environment:
E2E_TEST_TOKEN_DEV: some-token
DISABLE_ANALYTICS_FEATURES: 'true'
FLAGSMITH_API_URL: http://flagsmith-api:8000/api/v1/
SLACK_TOKEN: ${SLACK_TOKEN}
GITHUB_ACTION_URL: ${GITHUB_ACTION_URL}
VISUAL_REGRESSION: ${VISUAL_REGRESSION:-}
ports:
- 3000:3000
depends_on:
flagsmith-api:
condition: service_healthy
volumes:
- ./e2e/visual-regression-snapshots:/srv/flagsmith/e2e/visual-regression-snapshots
links:
- flagsmith-api:flagsmith-api
command: [npm, run, test]