创建程序目录结构;实现docker启动postgres和redis
This commit is contained in:
parent
53f590fed0
commit
1edf19be4b
0
backend/auth/Dockerfile
Normal file
0
backend/auth/Dockerfile
Normal file
20
docker-compose/.env
Normal file
20
docker-compose/.env
Normal file
@ -0,0 +1,20 @@
|
||||
COMPOSE_PROJECT_NAME=booksystem
|
||||
|
||||
# 通用设置
|
||||
# 容器内数据映射根目录,注意最后不要带斜杆
|
||||
CONTAINER_BASE_PATH=/home/booksystem
|
||||
|
||||
# 数据库信息
|
||||
DB_USER=admin
|
||||
DB_PASSWORD=PostgresAdmin@123
|
||||
DB_NAME=booksystem
|
||||
DB_PORT=5432
|
||||
DB_DATA_PATH=../postgres_data
|
||||
|
||||
# Redis信息
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=RedisAdmin@123
|
||||
|
||||
# 端口信息
|
||||
AUTH_PORT=8000
|
||||
FRONTEND_PORT=3000
|
||||
52
docker-compose/docker-compose.yml
Normal file
52
docker-compose/docker-compose.yml
Normal file
@ -0,0 +1,52 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# 数据库
|
||||
postgres:
|
||||
image: postgres:17
|
||||
container_name: bs-postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
ports:
|
||||
- "${DB_PORT}:5432"
|
||||
volumes:
|
||||
- ${DB_DATA_PATH}:${CONTAINER_BASE_PATH}/postgresql/data #此处使用主机的实际路径,不用再写顶层的volumes
|
||||
networks:
|
||||
- bs-network
|
||||
|
||||
# redis
|
||||
redis:
|
||||
image: redis:8.4.1-alpine
|
||||
container_name: bs-redis
|
||||
restart: always
|
||||
ports:
|
||||
- "${REDIS_PORT}:6379"
|
||||
command: >
|
||||
redis-server
|
||||
--requirepass ${REDIS_PASSWORD}
|
||||
--dir ${CONTAINER_BASE_PATH}/data
|
||||
--logfile ${CONTAINER_BASE_PATH}/redis/logs/redis-server.log
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
# 数据持久化:宿主机路径 -> 容器/data(Redis默认数据目录)
|
||||
- type: bind
|
||||
source: ../redis/data
|
||||
target: ${CONTAINER_BASE_PATH}/data/
|
||||
bind:
|
||||
create_host_path: true # 自动创建宿主机目录(无需手动建)
|
||||
# 日志挂载:宿主机路径 -> 容器日志目录
|
||||
- type: bind
|
||||
source: ../redis/logs
|
||||
target: ${CONTAINER_BASE_PATH}/redis/logs/
|
||||
bind:
|
||||
create_host_path: true # 自动创建日志目录
|
||||
networks:
|
||||
- bs-network
|
||||
|
||||
networks:
|
||||
bs-network:
|
||||
driver: bridge
|
||||
1
postgres_data/PG_VERSION
Normal file
1
postgres_data/PG_VERSION
Normal file
@ -0,0 +1 @@
|
||||
17
|
||||
BIN
postgres_data/base/1/112
Normal file
BIN
postgres_data/base/1/112
Normal file
Binary file not shown.
BIN
postgres_data/base/1/113
Normal file
BIN
postgres_data/base/1/113
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1247
Normal file
BIN
postgres_data/base/1/1247
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1247_fsm
Normal file
BIN
postgres_data/base/1/1247_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1247_vm
Normal file
BIN
postgres_data/base/1/1247_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1249
Normal file
BIN
postgres_data/base/1/1249
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1249_fsm
Normal file
BIN
postgres_data/base/1/1249_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1249_vm
Normal file
BIN
postgres_data/base/1/1249_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1255
Normal file
BIN
postgres_data/base/1/1255
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1255_fsm
Normal file
BIN
postgres_data/base/1/1255_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1255_vm
Normal file
BIN
postgres_data/base/1/1255_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1259
Normal file
BIN
postgres_data/base/1/1259
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1259_fsm
Normal file
BIN
postgres_data/base/1/1259_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/1259_vm
Normal file
BIN
postgres_data/base/1/1259_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13466
Normal file
BIN
postgres_data/base/1/13466
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13466_fsm
Normal file
BIN
postgres_data/base/1/13466_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13466_vm
Normal file
BIN
postgres_data/base/1/13466_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/13469
Normal file
0
postgres_data/base/1/13469
Normal file
BIN
postgres_data/base/1/13470
Normal file
BIN
postgres_data/base/1/13470
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13471
Normal file
BIN
postgres_data/base/1/13471
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13471_fsm
Normal file
BIN
postgres_data/base/1/13471_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13471_vm
Normal file
BIN
postgres_data/base/1/13471_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/13474
Normal file
0
postgres_data/base/1/13474
Normal file
BIN
postgres_data/base/1/13475
Normal file
BIN
postgres_data/base/1/13475
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13476
Normal file
BIN
postgres_data/base/1/13476
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13476_fsm
Normal file
BIN
postgres_data/base/1/13476_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13476_vm
Normal file
BIN
postgres_data/base/1/13476_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/13479
Normal file
0
postgres_data/base/1/13479
Normal file
BIN
postgres_data/base/1/13480
Normal file
BIN
postgres_data/base/1/13480
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13481
Normal file
BIN
postgres_data/base/1/13481
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13481_fsm
Normal file
BIN
postgres_data/base/1/13481_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/13481_vm
Normal file
BIN
postgres_data/base/1/13481_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/13484
Normal file
0
postgres_data/base/1/13484
Normal file
BIN
postgres_data/base/1/13485
Normal file
BIN
postgres_data/base/1/13485
Normal file
Binary file not shown.
0
postgres_data/base/1/1417
Normal file
0
postgres_data/base/1/1417
Normal file
0
postgres_data/base/1/1418
Normal file
0
postgres_data/base/1/1418
Normal file
BIN
postgres_data/base/1/174
Normal file
BIN
postgres_data/base/1/174
Normal file
Binary file not shown.
BIN
postgres_data/base/1/175
Normal file
BIN
postgres_data/base/1/175
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2187
Normal file
BIN
postgres_data/base/1/2187
Normal file
Binary file not shown.
0
postgres_data/base/1/2224
Normal file
0
postgres_data/base/1/2224
Normal file
BIN
postgres_data/base/1/2228
Normal file
BIN
postgres_data/base/1/2228
Normal file
Binary file not shown.
0
postgres_data/base/1/2328
Normal file
0
postgres_data/base/1/2328
Normal file
0
postgres_data/base/1/2336
Normal file
0
postgres_data/base/1/2336
Normal file
BIN
postgres_data/base/1/2337
Normal file
BIN
postgres_data/base/1/2337
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2579
Normal file
BIN
postgres_data/base/1/2579
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2600
Normal file
BIN
postgres_data/base/1/2600
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2600_fsm
Normal file
BIN
postgres_data/base/1/2600_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2600_vm
Normal file
BIN
postgres_data/base/1/2600_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2601
Normal file
BIN
postgres_data/base/1/2601
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2601_fsm
Normal file
BIN
postgres_data/base/1/2601_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2601_vm
Normal file
BIN
postgres_data/base/1/2601_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2602
Normal file
BIN
postgres_data/base/1/2602
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2602_fsm
Normal file
BIN
postgres_data/base/1/2602_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2602_vm
Normal file
BIN
postgres_data/base/1/2602_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2603
Normal file
BIN
postgres_data/base/1/2603
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2603_fsm
Normal file
BIN
postgres_data/base/1/2603_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2603_vm
Normal file
BIN
postgres_data/base/1/2603_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/2604
Normal file
0
postgres_data/base/1/2604
Normal file
BIN
postgres_data/base/1/2605
Normal file
BIN
postgres_data/base/1/2605
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2605_fsm
Normal file
BIN
postgres_data/base/1/2605_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2605_vm
Normal file
BIN
postgres_data/base/1/2605_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2606
Normal file
BIN
postgres_data/base/1/2606
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2606_fsm
Normal file
BIN
postgres_data/base/1/2606_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2606_vm
Normal file
BIN
postgres_data/base/1/2606_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2607
Normal file
BIN
postgres_data/base/1/2607
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2607_fsm
Normal file
BIN
postgres_data/base/1/2607_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2607_vm
Normal file
BIN
postgres_data/base/1/2607_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2608
Normal file
BIN
postgres_data/base/1/2608
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2608_fsm
Normal file
BIN
postgres_data/base/1/2608_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2608_vm
Normal file
BIN
postgres_data/base/1/2608_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2609
Normal file
BIN
postgres_data/base/1/2609
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2609_fsm
Normal file
BIN
postgres_data/base/1/2609_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2609_vm
Normal file
BIN
postgres_data/base/1/2609_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2610
Normal file
BIN
postgres_data/base/1/2610
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2610_fsm
Normal file
BIN
postgres_data/base/1/2610_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2610_vm
Normal file
BIN
postgres_data/base/1/2610_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/2611
Normal file
0
postgres_data/base/1/2611
Normal file
BIN
postgres_data/base/1/2612
Normal file
BIN
postgres_data/base/1/2612
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2612_fsm
Normal file
BIN
postgres_data/base/1/2612_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2612_vm
Normal file
BIN
postgres_data/base/1/2612_vm
Normal file
Binary file not shown.
0
postgres_data/base/1/2613
Normal file
0
postgres_data/base/1/2613
Normal file
BIN
postgres_data/base/1/2615
Normal file
BIN
postgres_data/base/1/2615
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2615_fsm
Normal file
BIN
postgres_data/base/1/2615_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2615_vm
Normal file
BIN
postgres_data/base/1/2615_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2616
Normal file
BIN
postgres_data/base/1/2616
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2616_fsm
Normal file
BIN
postgres_data/base/1/2616_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2616_vm
Normal file
BIN
postgres_data/base/1/2616_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2617
Normal file
BIN
postgres_data/base/1/2617
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2617_fsm
Normal file
BIN
postgres_data/base/1/2617_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2617_vm
Normal file
BIN
postgres_data/base/1/2617_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2618
Normal file
BIN
postgres_data/base/1/2618
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2618_fsm
Normal file
BIN
postgres_data/base/1/2618_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2618_vm
Normal file
BIN
postgres_data/base/1/2618_vm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2619
Normal file
BIN
postgres_data/base/1/2619
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2619_fsm
Normal file
BIN
postgres_data/base/1/2619_fsm
Normal file
Binary file not shown.
BIN
postgres_data/base/1/2619_vm
Normal file
BIN
postgres_data/base/1/2619_vm
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user