-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
72 lines (65 loc) · 1.38 KB
/
docker-compose.yml
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
x-app: &app
build:
context: .
target: viva-base
image: ghcr.io/notch8/viva:${TAG:-latest}
volumes:
- .:/app
env_file:
- .env
- .env.development
# Keep the stdin open, so we can attach to our app container's process
# and do things such as byebug, etc:
stdin_open: true
# Enable sending signals (CTRL+C, CTRL+P + CTRL+Q) into the container:
tty: true
services:
postgres:
image: postgres
env_file:
- .env
ports:
- 5432
volumes:
- postgres:/var/lib/postgresql/data
vite:
<<: *app
entrypoint: /bin/bash ./ops/entrypoint-vite.sh
environment:
DEBUG: '*vite*'
RAILS_ENV: development
VITE_RUBY_HOST: 0.0.0.0
ports:
- "3036:3036"
web:
<<: *app
command: bash -c "bundle exec puma -p 3000"
ports:
- 3000
depends_on:
- postgres
- vite
environment:
VIRTUAL_HOST: viva.test
VIRTUAL_PORT: 3000
VITE_RUBY_HOST: vite
initialize_app:
<<: *app
entrypoint: ["sh", "-c"]
command:
- >
bundle && rails db:migrate && rails db:seed
depends_on:
- web
- vite
cypress-tests:
container_name: cypress-tests
image: cypress/included:13.2.0
working_dir: /cypress
volumes:
- ./:/cypress
depends_on:
initialize_app:
condition: service_completed_successfully
volumes:
postgres: