-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (67 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
71 lines (67 loc) · 1.59 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
services:
# PostgreSQL Database (Development Only)
database:
image: postgres:18
environment:
POSTGRES_DB: the_beans_db
POSTGRES_USER: beans_user
POSTGRES_PASSWORD: "2w3E4r%T"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql
- ./server/prisma/schema.prisma:/docker-entrypoint-initdb.d/schema.prisma
networks:
- coffee-network
restart: unless-stopped
# Backend API Server
server:
build: ./server
ports:
- "5000:5000"
volumes:
- ./server:/app
- /app/node_modules
- /var/run/docker.sock:/var/run/docker.sock
env_file:
- ./server/.env
environment:
- NODE_ENV=development
- DOCKER_ENV=true
- DATABASE_URL=postgresql://beans_user:2w3E4r%25T@database:5432/the_beans_db
- FRONTEND_URL=http://localhost:3000
- DB_NAME=the_beans_db
- DB_USER=beans_user
- DB_CONTAINER_NAME=the-beans-database-1
depends_on:
- database
networks:
- coffee-network
restart: unless-stopped
# Frontend Next.js App
client:
build: ./client
ports:
- "3000:3000"
volumes:
- ./client:/app
- /app/node_modules
- /app/.next
env_file:
- ./client/.env.local
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=http://localhost:5000
- NEXT_PUBLIC_SHOW_RATINGS=false
depends_on:
- server
networks:
- coffee-network
restart: unless-stopped
networks:
coffee-network:
driver: bridge
volumes:
postgres_data:
server_node_modules:
client_node_modules: