-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
59 lines (59 loc) · 1.4 KB
/
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
name: luongvietdung_youtube_video_sharing
services:
redis:
image: redis
ports:
- "6384:6379"
volumes:
- redis-data:/data
db:
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-sharing_video}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
PGDATA: /data/postgres
volumes:
- postgres-data:/data/postgres
ports:
- "5432:5432"
backend:
tty: true
platform: linux/x86_64
build:
context: .
dockerfile: .docker/Dockerfile.ruby
command: bash -c 'rm -rf tmp/pids/server.pid && bin/setup && bin/rails db:seed && bin/rails s -b 0.0.0.0'
volumes:
- ./backend:/workspace
- bundle_path:/usr/local/bundle
environment:
RAILS_MASTER_KEY: 735e75481d3c15f7e562f01a11bf1075
DB_USER: ${DB_USER:-sharing_video}
DB_PASSWORD: ${DB_PASSWORD:-password}
DB_PORT: 5432
DB_HOST: db
REDIS_URL: redis://redis:6379/1
depends_on:
- redis
- db
ports:
- 3000:3000
frontend:
tty: true
platform: linux/x86_64
build:
context: .
dockerfile: .docker/Dockerfile.node20
command: bash -c 'npm install && PORT=9000 npm run dev'
volumes:
- ./frontend:/workspace
depends_on:
- backend
ports:
- 9000:9000
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
postgres-data:
redis-data:
bundle_path: