feat: add Docker deployment and application configuration
Add package declarations across the Go scaffold, YAML configuration loading and validation, and a minimal API entry point. Add development and production Compose files, a multi-stage Docker image, configuration template, and Make targets. Remove the directory scaffolding script.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
image: robot-market-backend:dev
|
||||
environment:
|
||||
CONFIG_FILE: /etc/robot-market/config.yaml
|
||||
volumes:
|
||||
- ../configs/config.example.yaml:/etc/robot-market/config.yaml:ro
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8080"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
image: ${ROBOT_MARKET_IMAGE:-robot-market-backend:latest}
|
||||
environment:
|
||||
CONFIG_FILE: /etc/robot-market/config.yaml
|
||||
volumes:
|
||||
- ${CONFIG_FILE:-../configs/config.example.yaml}:/etc/robot-market/config.yaml:ro
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8080"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user