-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (68 loc) · 1.83 KB
/
docker-compose.yml
File metadata and controls
73 lines (68 loc) · 1.83 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
72
73
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15
container_name: nextlog-postgres
restart: unless-stopped
environment:
POSTGRES_DB: nextlog
POSTGRES_USER: nextlog
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres-init.sql:/docker-entrypoint-initdb.d/postgres-init.sql:ro
networks:
- nextlog-network
# Next.js Application (Development)
nextlog-app:
build:
context: .
dockerfile: Dockerfile.dev
container_name: nextlog-app
restart: unless-stopped
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://nextlog:password@postgres:5432/nextlog
- JWT_SECRET=your-jwt-secret-key-for-development
- NEXT_PUBLIC_API_URL=http://localhost:3000
- ENCRYPTION_SECRET=supersecretkeyforencryption
ports:
- "3000:3000"
volumes:
- ./src:/app/src
- ./public:/app/public
- ./tailwind.config.ts:/app/tailwind.config.ts
- ./next.config.ts:/app/next.config.ts
- ./tsconfig.json:/app/tsconfig.json
- ./postcss.config.mjs:/app/postcss.config.mjs
- ./components.json:/app/components.json
- ./eslint.config.mjs:/app/eslint.config.mjs
- /app/.next
- /app/node_modules
depends_on:
- postgres
networks:
- nextlog-network
command: npm run dev
# PostgreSQL Admin Interface (Optional)
pgadmin:
image: dpage/pgadmin4:latest
container_name: nextlog-pgadmin
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@nextlog.com
PGADMIN_DEFAULT_PASSWORD: admin123
ports:
- "8081:80"
depends_on:
- postgres
networks:
- nextlog-network
volumes:
postgres_data:
networks:
nextlog-network:
driver: bridge