This commit is contained in:
vipg
2025-11-14 15:22:44 +08:00
parent 49c233a914
commit 81748a09c0
9 changed files with 41 additions and 41 deletions

View File

@@ -1,7 +1,7 @@
services:
postgres:
image: postgres:17.4-alpine
container_name: futures_trading_record_db
container_name: futures_trade_record_db
restart: always
ports:
- 20011:5432
@@ -13,21 +13,21 @@ services:
POSTGRES_DB: ${DB_NAME}
TZ: ${TZ}
volumes:
- ./shared_data/futures_trading_record_db:/var/lib/postgresql/data
- ./shared_data/futures_trade_record_db:/var/lib/postgresql/data
- ./sql:/docker-entrypoint-initdb.d
- ./scripts:/scripts
networks:
- futures-trading-record-network
futures_trading_record:
- futures-trade-record-network
futures_trade_record:
image: golang:1.25.0-alpine3.22
container_name: futures_trading_record_api
container_name: futures_trade_record_api
restart: always
ports:
- 20010:80
depends_on:
- postgres
networks:
- futures-trading-record-network
- futures-trade-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:
futures-trading-record-network:
futures-trade-record-network:
driver: bridge
volumes: {}