-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
66 lines (61 loc) · 1.64 KB
/
docker-compose.yaml
File metadata and controls
66 lines (61 loc) · 1.64 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: codeguide-starter-fullstack-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- codeguide-starter-fullstack-network
# Next.js Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: codeguide-starter-fullstack-app
restart: unless-stopped
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- BETTER_AUTH_SECRET=your-super-secret-key-change-in-production
- BETTER_AUTH_URL=http://localhost:3000
ports:
- "3000:3000"
depends_on:
- postgres
networks:
- codeguide-starter-fullstack-network
# Development database only
postgres-dev:
image: postgres:16-alpine
container_name: codeguide-starter-fullstack-postgres-dev
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- "5433:5432"
volumes:
- postgres_dev_data:/var/lib/postgresql/data
networks:
- codeguide-starter-fullstack-network
profiles:
- dev
volumes:
postgres_data:
driver: local
postgres_dev_data:
driver: local
networks:
codeguide-starter-fullstack-network:
driver: bridge