mirror of
https://github.com/kjanat/articulate-parser.git
synced 2026-01-16 13:42:10 +01:00
Add Docker support and GitHub Container Registry CI workflow (#3)
* Add comprehensive Docker support with multi-stage builds * Set up GitHub Container Registry integration * Enhance CI/CD workflows with Docker build and push capabilities * Add --help and --version flags to main application * Update documentation with Docker usage examples * Implement security best practices for container deployment
This commit is contained in:
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
||||
services:
|
||||
articulate-parser: &articulate-parser
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VERSION: "dev"
|
||||
BUILD_TIME: "2024-01-01T00:00:00Z"
|
||||
GIT_COMMIT: "dev"
|
||||
image: articulate-parser:local
|
||||
volumes:
|
||||
# Mount current directory to /workspace for file access
|
||||
- .:/workspace
|
||||
working_dir: /workspace
|
||||
# Override entrypoint for interactive use
|
||||
entrypoint: ["/articulate-parser"]
|
||||
# Default to showing help
|
||||
command: ["--help"]
|
||||
|
||||
# Service for processing files with volume mounts
|
||||
parser-with-files:
|
||||
<<: *articulate-parser
|
||||
volumes:
|
||||
- ./input:/input:ro
|
||||
- ./output:/output
|
||||
command: ["/input/sample.json", "markdown", "/output/result.md"]
|
||||
|
||||
# Service for development - with shell access
|
||||
parser-dev:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
image: articulate-parser:dev
|
||||
volumes:
|
||||
- .:/workspace
|
||||
working_dir: /workspace
|
||||
entrypoint: ["/bin/sh"]
|
||||
command: ["-c", "while true; do sleep 30; done"]
|
||||
# Uses Dockerfile.dev with Alpine base instead of scratch for shell access
|
||||
Reference in New Issue
Block a user