-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
47 lines (43 loc) · 981 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
47 lines (43 loc) · 981 Bytes
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
services:
postgres:
image: postgres:16
container_name: url_shortener_postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: url_shortener
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7
container_name: url_shortener_redis
ports:
- "6379:6379"
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: url_shortener_backend
ports:
- "4000:4000"
environment:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/url_shortener
REDIS_HOST: redis
depends_on:
- postgres
- redis
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_BASE_URL: http://localhost:4000
container_name: url_shortener_frontend
ports:
- "5173:5173"
depends_on:
- backend
volumes:
postgres_data: