Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Deploy mosgarage
name: Build & Deploy code-server

on:
push:
Expand All @@ -16,7 +16,7 @@ on:

env:
REGISTRY: docker.io
IMAGE_NAME: mosgarage/mosgarage
IMAGE_NAME: mosgarage/code-server
PLATFORMS: linux/amd64,linux/arm64

jobs:
Expand Down Expand Up @@ -84,14 +84,14 @@ jobs:
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
username: mosgarage
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ghcr.io/mosgarage/code-server
tags: |
type=ref,event=branch
type=ref,event=pr
Expand All @@ -102,9 +102,9 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=mosgarage
org.opencontainers.image.description=mosgarage premium home base
org.opencontainers.image.url=https://hub.docker.com/r/mosgarage/mosgarage
org.opencontainers.image.source=https://github.com/mosgarage/mosgaragedev
org.opencontainers.image.description=mosgarage premium codeserver base
org.opencontainers.image.url=https://hub.docker.com/r/mosgarage/code-server
org.opencontainers.image.source=https://github.com/mosgarage/code-server
org.opencontainers.image.vendor=mosgarage

- name: Build and push
Expand All @@ -130,7 +130,7 @@ jobs:
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
echo "| Image | \`docker.io/mosgarage/mosgarage\` |" >> $GITHUB_STEP_SUMMARY
echo "| Image | \`docker.io/mosgarage/code-server\` |" >> $GITHUB_STEP_SUMMARY
echo "| Digest | \`${{ steps.build.outputs.digest }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Tags | ${{ steps.meta.outputs.tags }} |" >> $GITHUB_STEP_SUMMARY
echo "| Platforms | ${{ env.PLATFORMS }} |" >> $GITHUB_STEP_SUMMARY
Expand All @@ -148,6 +148,6 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: mosgarage/mosgarage
repository: mosgarage/code-server
readme-filepath: ./README.md
continue-on-error: true
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# ============================================================
# mosgarage/mosgarage — Home Base Docker Image
# mosgarage/code-server — Home Base Docker Image
# Includes: code-server | Node.js 20 LTS | Express API | PM2
# GitHub auto-sync (git-setup + git-sync daemon)
# ============================================================

FROM ubuntu:22.04

LABEL maintainer="mosgarage"
LABEL org.opencontainers.image.source="https://github.com/mosgarage/mosgaragedev"
LABEL image="docker.io/mosgarage/mosgarage"
LABEL org.opencontainers.image.source="https://github.com/mosgarage/code-server"
LABEL image="docker.io/mosgarage/code-server"
LABEL description="mosgarage home base: code-server + node server + API + GitHub sync"

# ── Prevent interactive prompts ──────────────────────────────
Expand All @@ -27,7 +27,7 @@ ENV API_KEY=
# ── GitHub sync ───────────────────────────────────────────────
ENV GITHUB_USER=mosgaragedev
ENV GITHUB_ORG=mosgarage
ENV GITHUB_REPO=mosgaragedev
ENV GITHUB_REPO=code-server
ENV GITHUB_TOKEN=
ENV GIT_BRANCH=main
ENV GIT_NAME=mosgaragedev
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ============================================================
# mosgarage · Makefile
# code-server · Makefile
# Usage: make <target>
# ============================================================

IMAGE := docker.io/mosgarage/mosgarage
CONTAINER := mosgarage
IMAGE := docker.io/mosgarage/code-server
CONTAINER := code-server
VERSION ?= latest

.PHONY: help build push run stop shell logs status git-sync git-status \
Expand All @@ -14,7 +14,7 @@ VERSION ?= latest
help:
@echo ""
@echo "╔══════════════════════════════════════════════════╗"
@echo "║ mosgarage · Makefile targets ║"
@echo "║ code-server · Makefile targets ║"
@echo "╠══════════════════════════════════════════════════╣"
@echo "║ make setup First-time setup ║"
@echo "║ make build Build Docker image ║"
Expand Down Expand Up @@ -67,15 +67,15 @@ push:
up:
@[[ -f .env ]] || { echo "❌ .env missing — run: make setup"; exit 1; }
docker compose up -d
@echo "✅ mosgarage is running"
@echo "✅ code-server is running"
@echo " https://localhost (Nginx — all services)"
@echo " http://localhost:8080 (code-server direct)"

down:
docker compose down

restart:
docker compose restart mosgarage
docker compose restart code-server

deploy: push up
@echo "✅ Deploy complete"
Expand All @@ -88,13 +88,13 @@ logs:
docker compose logs -f $(CONTAINER)

log-git:
docker exec $(CONTAINER) tail -f /var/log/mosgarage/git-sync.log
docker exec $(CONTAINER) tail -f /var/log/code-server/git-sync.log

log-api:
docker exec $(CONTAINER) tail -f /var/log/mosgarage/api-server.log
docker exec $(CONTAINER) tail -f /var/log/code-server/api-server.log

log-nginx:
docker exec $(CONTAINER) tail -f /var/log/mosgarage/nginx-access.log
docker exec $(CONTAINER) tail -f /var/log/code-server/nginx-access.log

status:
@echo ""
Expand Down Expand Up @@ -125,9 +125,9 @@ setup-secrets:
@command -v gh >/dev/null || { echo "❌ Install GitHub CLI: https://cli.github.com"; exit 1; }
@[[ -n "$$DOCKERHUB_USERNAME" ]] || { echo "❌ Set DOCKERHUB_USERNAME env var"; exit 1; }
@[[ -n "$$DOCKERHUB_TOKEN" ]] || { echo "❌ Set DOCKERHUB_TOKEN env var"; exit 1; }
gh secret set DOCKERHUB_USERNAME --body "$$DOCKERHUB_USERNAME" --repo mosgarage/mosgaragedev
gh secret set DOCKERHUB_TOKEN --body "$$DOCKERHUB_TOKEN" --repo mosgarage/mosgaragedev
@echo "✅ GitHub secrets set for mosgarage/mosgaragedev"
gh secret set DOCKERHUB_USERNAME --body "$$DOCKERHUB_USERNAME" --repo mosgarage/code-server
gh secret set DOCKERHUB_TOKEN --body "$$DOCKERHUB_TOKEN" --repo mosgarage/code-server
@echo "✅ GitHub secrets set for mosgarage/code-server"

# ── Clean ─────────────────────────────────────────────────────
clean:
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ============================================================
# mosgarage/mosgarage — Docker Compose
# GitHub: github.com/mosgarage/mosgaragedev
# mosgarage/code-server — Docker Compose
# GitHub: github.com/mosgarage/code-serverdev
# ============================================================

services:
mosgarage:
image: docker.io/mosgarage/mosgarage:latest
image: docker.io/mosgarage/code-server:latest
container_name: mosgarage
build:
context: .
Expand Down Expand Up @@ -55,7 +55,7 @@ services:

# SSH deploy key (Option A auth — comment out if using GITHUB_TOKEN)
# Generate with: ./scripts/gen-deploy-key.sh
# Add public key at: github.com/mosgarage/mosgaragedev/settings/keys
# Add public key at: github.com/mosgarage/code-server/settings/keys
- ./ssh-keys/id_ed25519:/home/mosgarage/.ssh/id_ed25519:ro
# - ./ssh-keys/id_ed25519.pub:/home/mosgarage/.ssh/id_ed25519.pub:ro

Expand Down
Loading