add
This commit is contained in:
@@ -15,7 +15,7 @@ log_error() {
|
||||
}
|
||||
|
||||
# 定义配置常量(等号两侧无空格!集中管理,便于修改)
|
||||
IMAGE_NAME="country-api"
|
||||
IMAGE_NAME="futures-trading-record-api"
|
||||
IMAGE_TAG="1.0.0"
|
||||
FULL_IMAGE="${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
COMPOSE_PROJECT_NAME="country_service"
|
||||
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
- ./scripts:/scripts
|
||||
networks:
|
||||
- country-network
|
||||
- futures-trading-record-network
|
||||
country:
|
||||
image: golang:1.25.0-alpine3.22
|
||||
container_name: country_api
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- country-network
|
||||
- futures-trading-record-network
|
||||
environment:
|
||||
DB_HOST: postgres
|
||||
DB_PORT: ${DB_PORT}
|
||||
@@ -39,6 +39,6 @@ services:
|
||||
- ./src:/app
|
||||
command: sh -c "cd /app && go mod tidy && go run main.go"
|
||||
networks:
|
||||
country-network:
|
||||
futures-trading-record-network:
|
||||
driver: bridge
|
||||
volumes: {}
|
||||
|
||||
@@ -17,9 +17,9 @@ services:
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
- ./scripts:/scripts
|
||||
networks:
|
||||
- country-network
|
||||
- futures-trading-record-network
|
||||
country:
|
||||
image: country-api:1.0.0
|
||||
image: futures-trading-record-api:1.0.0
|
||||
container_name: country_api
|
||||
restart: always
|
||||
ports:
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- country-network
|
||||
- futures-trading-record-network
|
||||
environment:
|
||||
DB_HOST: postgres
|
||||
DB_PORT: ${DB_PORT}
|
||||
@@ -39,6 +39,6 @@ services:
|
||||
# 挂载添加日志目录挂载,将容器内日志日志目录映射到宿主机的 ./logs 目录
|
||||
- ./logs:/app/logs # 假设代码中日志存储路径为 /app/logs
|
||||
networks:
|
||||
country-network:
|
||||
futures-trading-record-network:
|
||||
driver: bridge
|
||||
volumes: {}
|
||||
|
||||
Reference in New Issue
Block a user