-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
45 lines (43 loc) · 1.08 KB
/
docker-compose.yml
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
# 生产环境的启动
services:
web:
# image: erich2s/maintenance-management-system:latest
build: .
environment:
# web-push 设置
WEB_PUSH_CONTACT: ${WEB_PUSH_CONTACT}
NEXT_PUBLIC_VAPID_KEY: ${NEXT_PUBLIC_VAPID_KEY}
PRIVATE_VAPID_KEY: ${PRIVATE_VAPID_KEY}
# JWT secret
SECRET: ${SECRET}
# DB
DATABASE_URL: postgres://admin:123456@postgres:5432/nextjs
# !!生产环境中这里要手动设置NEXTAUTH_URL成宿主机的地址
NEXTAUTH_URL: http://localhost
restart: always
container_name: nextjs_container
depends_on:
- postgres
nginx:
image: nginx:latest
restart: always
container_name: nginx_container
ports:
- 80:80
depends_on:
- web
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
expose:
- 80
postgres:
image: postgres:15.4
restart: always
container_name: postgres_container
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=123456
volumes:
- mms-postgres:/var/lib/postgresql/data
volumes:
mms-postgres: