Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
悠灵
Chatroom
Commits
1491b098
Commit
1491b098
authored
Aug 31, 2025
by
root
Browse files
docker 3
parent
8f99361a
Changes
1
Hide whitespace changes
Inline
Side-by-side
docker-compose.yml
View file @
1491b098
version
:
'
3.8'
services
:
# Next.js 应用服务
app
:
build
:
.
container_name
:
chatroom-app
ports
:
-
"
3000:3000"
environment
:
-
DATABASE_URL=postgresql://postgres:postgres@db:5432/chatroom?schema=public
depends_on
:
db
:
condition
:
service_healthy
restart
:
unless-stopped
# PostgreSQL 数据库服务
db
:
image
:
postgres:15
container_name
:
chatroom-db
environment
:
POSTGRES_USER
:
postgres
POSTGRES_PASSWORD
:
postgres
POSTGRES_DB
:
chatroom
volumes
:
-
postgres-data:/var/lib/postgresql/data
ports
:
-
"
5432:5432"
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
pg_isready
-U
postgres"
]
interval
:
5s
timeout
:
5s
retries
:
5
volumes
:
postgres-data
:
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment