Repository navigation
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
132 lines (125 loc) · 3.23 KB
/
Copy pathdocker-compose.ci.yml
File metadata and controls
132 lines (125 loc) · 3.23 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
services:
e2e_test:
build:
context: .
target: test
args:
VERSION_SUFFIX: ${VERSION_SUFFIX:-}
x-bake:
cache-from:
- type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:cache-e2e-test
cache-to:
- type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:cache-e2e-test,mode=max
environment:
APP_HOST: "e2e_test"
E2E_TARGET_HOST: "e2e_target:3002"
DATABASE_URL: postgresql://postgres:postgres@db/heimv_e2e?encoding=unicode&pool=5
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true"
DISABLE_DATABASE_ENVIRONMENT_CHECK: "1"
RAILS_ENV: test
NODE_ENV: test
SELENIUM_HOST: "selenium:4444"
SELENIUM_BROWSER: "${SELENIUM_BROWSER:-chrome}"
SMTP_SETTINGS: "{ \"address\":\"mail\", \"port\": 1025 }"
MAIL_FROM: "no-reply@heimv.local"
command: bin/check_ci
depends_on:
db:
condition: service_healthy
selenium:
condition: service_started
networks:
default:
selenium:
e2e_target:
build:
context: .
target: production
args:
VERSION_SUFFIX: ${VERSION_SUFFIX:-}
x-bake:
cache-from:
- type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:cache-e2e-target
cache-to:
- type=registry,ref=ghcr.io/${GITHUB_REPOSITORY}:cache-e2e-target,mode=max
ports:
- "3002:3002"
healthcheck:
test: [ "CMD-SHELL", "curl -fsS http://localhost:3002/health || exit 1" ]
interval: 3s
timeout: 5s
retries: 20
start_period: 5s
environment:
APP_HOST: "e2e_target:3002"
DATABASE_URL: postgresql://postgres:postgres@db/heimv_e2e?encoding=unicode&pool=5
SMTP_SETTINGS: "{ \"address\":\"mail\", \"port\": 1025 }"
MAIL_FROM: "no-reply@heimv.local"
SECRET_KEY_BASE: "test"
RAILS_SERVE_STATIC_FILES: "true"
PORT: 3002
LOG_LEVEL: "debug"
RUBYOPT: "-W:no-deprecated -W:no-experimental"
REDIS_URL: "redis://valkey/0"
CI: "true"
depends_on:
db:
condition: service_healthy
mail:
condition: service_started
selenium:
condition: service_started
valkey:
condition: service_started
networks:
default:
selenium:
selenium:
image: ${SELENIUM_IMAGE:-selenium/standalone-chrome}
shm_size: 2g
networks:
selenium:
# volumes:
# - /dev/shm:/dev/shm
logging:
driver: none
# noVNC in browser with password «secret»
ports:
- "7900:7900"
# video:
# image: selenium/video
# depends_on:
# - selenium
# environment:
# - DISPLAY_CONTAINER_NAME=selenium
# volumes:
# - ./videos:/videos
# networks:
# selenium:
db:
image: postgres:18
environment:
POSTGRES_DB: heimv_e2e
POSTGRES_PASSWORD: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
mail:
image: sj26/mailcatcher
ports:
- "1080:1080"
valkey:
image: valkey/valkey
depends_on:
db:
condition: service_healthy
selenium:
condition: service_started
networks:
default:
selenium:
networks:
selenium:
default: