GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CloudShell/Dockerfile.backend at main · iu2frl/CloudShell

Expand file tree

/

Dockerfile.backend

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
46 lines (33 loc) · 1.44 KB
/

Dockerfile.backend

Copy path

File metadata and controls

46 lines (33 loc) · 1.44 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM python:3.12-slim
# APP_VERSION is injected at build time (e.g. --build-arg APP_VERSION=v1.2.3).
# Falls back to "dev" for local builds.
ARG APP_VERSION=dev
LABEL org.opencontainers.image.title="CloudShell Backend" \
org.opencontainers.image.description="Self-hosted web SSH gateway — API server" \
org.opencontainers.image.licenses="GPL-3.0-only" \
org.opencontainers.image.source="https://github.com/iu2frl/CloudShell"
# System deps for asyncssh / cryptography
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Run as non-root user
RUN groupadd --gid 1001 appgroup \
&& useradd --uid 1001 --gid appgroup --no-create-home appuser
WORKDIR /app
# Install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend source
COPY backend/ ./backend/
# Data directory — will be overridden by a volume in production
RUN mkdir -p /data/keys && chmod 700 /data/keys && chown -R appuser:appgroup /data /app
USER appuser
ENV DATA_DIR=/data \
ADMIN_USER=admin \
TOKEN_TTL_HOURS=8 \
APP_VERSION=${APP_VERSION}
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -sf http://localhost:8000/api/health || exit 1
CMD ["python", "-m", "uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips", "*"]
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.