This commit is contained in:
Aditya Siregar
2025-07-30 23:18:20 +07:00
parent 4a921df55d
commit a759e0f57c
57 changed files with 3633 additions and 190 deletions
+12
View File
@@ -49,6 +49,17 @@ show_help() {
build_image() {
log_info "Building apskel-pos-backend Docker image..."
# Check if Go build works locally first (optional quick test)
if command -v go &> /dev/null; then
log_info "Testing Go build locally first..."
if go build -o /tmp/test-build cmd/server/main.go 2>/dev/null; then
log_success "Local Go build test passed"
rm -f /tmp/test-build
else
log_warning "Local Go build test failed, but continuing with Docker build..."
fi
fi
# Build the image with production target
docker build \
--target production \
@@ -60,6 +71,7 @@ build_image() {
log_success "Docker image built successfully!"
else
log_error "Failed to build Docker image"
log_info "Make sure you're using Go 1.21+ and all dependencies are available"
exit 1
fi
}