-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.43 KB
/
docker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.43 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
version: "3.8"
services:
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: editing_note_development
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: ../docker/backend/Dockerfile
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails server -b '0.0.0.0'"
entrypoint: /usr/bin/entrypoint.sh
volumes:
- ./backend:/app
- bundle_data:/usr/local/bundle
- ./docker/backend/entrypoint.sh:/usr/bin/entrypoint.sh:ro
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: db
DB_NAME: editing_note_development
DB_NAME_TEST: editing_note_test
DB_USERNAME: postgres
DB_PASSWORD: password
RAILS_ENV: development
CORS_ALLOWED_ORIGINS: "http://localhost:5174"
stdin_open: true
tty: true
frontend:
build:
context: ./frontend
dockerfile: ../docker/frontend/Dockerfile
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5174:5173"
environment:
- VITE_API_URL=http://localhost:3000
depends_on:
- backend
volumes:
postgres_data:
bundle_data: