Skip to content

Commit 1f6b86b

Browse files
Initial app template with deploy workflow, app.yaml, and Dockerfile
0 parents  commit 1f6b86b

4 files changed

Lines changed: 91 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches: [main, master]
5+
pull_request:
6+
jobs:
7+
javabin:
8+
uses: javaBin/platform/.github/workflows/javabin.yml@main
9+
secrets: inherit

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Multi-stage build — adjust base images for your runtime
2+
FROM eclipse-temurin:21-jdk-alpine AS build
3+
WORKDIR /app
4+
COPY . .
5+
RUN ./mvnw -q package -DskipTests
6+
7+
FROM eclipse-temurin:21-jre-alpine
8+
WORKDIR /app
9+
COPY --from=build /app/target/*.jar app.jar
10+
EXPOSE 8080
11+
ENTRYPOINT ["java", "-jar", "app.jar"]

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# My Service
2+
3+
A Javabin platform service.
4+
5+
## Getting Started
6+
7+
1. **Create from template**: Click "Use this template" on GitHub
8+
2. **Register your app**: Open a PR to [javaBin/registry](https://github.com/javaBin/registry) adding `apps/your-service.yaml`
9+
3. **Customize `app.yaml`**: Set your service name, team, compute, and routing
10+
4. **Push to main**: The platform CI pipeline builds, plans, reviews, and deploys automatically
11+
12+
## Platform Features
13+
14+
- Automatic Docker build and ECR push
15+
- Terraform infrastructure from `app.yaml` (S3, DynamoDB, SQS, Secrets Manager)
16+
- LLM-powered plan review with risk gating
17+
- ECS Fargate deployment with health checks
18+
- CloudWatch alarms and cost monitoring
19+
20+
## References
21+
22+
- [app.yaml reference](https://github.com/javaBin/platform/blob/main/docs/app-yaml-reference.md)
23+
- [Platform documentation](https://github.com/javaBin/platform)
24+
- [Registry](https://github.com/javaBin/registry)

app.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# app.yaml — Javabin Platform Service Configuration
2+
# Full reference: https://github.com/javaBin/platform/blob/main/docs/app-yaml-reference.md
3+
4+
# Service name (required) — lowercase + hyphens, max 20 chars
5+
name: my-service
6+
7+
# Owning team (required) — must match a team in javaBin/registry
8+
team: my-team
9+
10+
# Container compute settings (optional, defaults shown)
11+
compute:
12+
cpu: 512 # vCPU units (256, 512, 1024, 2048, 4096)
13+
memory: 1024 # MB (512-30720, must match cpu)
14+
port: 8080 # container port your app listens on
15+
desired_count: 1 # number of running tasks
16+
health_check: /health
17+
18+
# ALB routing (required for web services)
19+
routing:
20+
host: my-service.javazone.no # DNS name, must be under javazone.no
21+
priority: 100 # unique across all apps (1-50000)
22+
23+
# Infrastructure resources (optional) — auto-wired to your container
24+
# resources:
25+
# buckets:
26+
# - name: data
27+
# env: DATA_BUCKET
28+
# databases:
29+
# - name: cache
30+
# hash_key: id
31+
# env: CACHE_TABLE
32+
# secrets:
33+
# - name: api-key
34+
# env: API_KEY
35+
# queues:
36+
# - name: jobs
37+
# env: JOBS_QUEUE_URL
38+
39+
# Cognito auth (optional) — internal, external, both, or none
40+
# auth: internal
41+
42+
# Custom environment variables
43+
# environment:
44+
# LOG_LEVEL: info
45+
46+
# Monthly budget alert in NOK (default: 1000)
47+
# budget_alert_nok: 500

0 commit comments

Comments
 (0)