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"
|
IMAGE_TAG="1.0.0"
|
||||||
FULL_IMAGE="${IMAGE_NAME}:${IMAGE_TAG}"
|
FULL_IMAGE="${IMAGE_NAME}:${IMAGE_TAG}"
|
||||||
COMPOSE_PROJECT_NAME="country_service"
|
COMPOSE_PROJECT_NAME="country_service"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ services:
|
|||||||
- ./sql:/docker-entrypoint-initdb.d
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
- ./scripts:/scripts
|
- ./scripts:/scripts
|
||||||
networks:
|
networks:
|
||||||
- country-network
|
- futures-trading-record-network
|
||||||
country:
|
country:
|
||||||
image: golang:1.25.0-alpine3.22
|
image: golang:1.25.0-alpine3.22
|
||||||
container_name: country_api
|
container_name: country_api
|
||||||
@@ -27,7 +27,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- country-network
|
- futures-trading-record-network
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
DB_PORT: ${DB_PORT}
|
DB_PORT: ${DB_PORT}
|
||||||
@@ -39,6 +39,6 @@ services:
|
|||||||
- ./src:/app
|
- ./src:/app
|
||||||
command: sh -c "cd /app && go mod tidy && go run main.go"
|
command: sh -c "cd /app && go mod tidy && go run main.go"
|
||||||
networks:
|
networks:
|
||||||
country-network:
|
futures-trading-record-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
volumes: {}
|
volumes: {}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ services:
|
|||||||
- ./sql:/docker-entrypoint-initdb.d
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
- ./scripts:/scripts
|
- ./scripts:/scripts
|
||||||
networks:
|
networks:
|
||||||
- country-network
|
- futures-trading-record-network
|
||||||
country:
|
country:
|
||||||
image: country-api:1.0.0
|
image: futures-trading-record-api:1.0.0
|
||||||
container_name: country_api
|
container_name: country_api
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@@ -27,7 +27,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
networks:
|
networks:
|
||||||
- country-network
|
- futures-trading-record-network
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: postgres
|
DB_HOST: postgres
|
||||||
DB_PORT: ${DB_PORT}
|
DB_PORT: ${DB_PORT}
|
||||||
@@ -39,6 +39,6 @@ services:
|
|||||||
# 挂载添加日志目录挂载,将容器内日志日志目录映射到宿主机的 ./logs 目录
|
# 挂载添加日志目录挂载,将容器内日志日志目录映射到宿主机的 ./logs 目录
|
||||||
- ./logs:/app/logs # 假设代码中日志存储路径为 /app/logs
|
- ./logs:/app/logs # 假设代码中日志存储路径为 /app/logs
|
||||||
networks:
|
networks:
|
||||||
country-network:
|
futures-trading-record-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
volumes: {}
|
volumes: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user