add server
This commit is contained in:
parent
0465146fec
commit
5b188f0b32
5 changed files with 73 additions and 8 deletions
|
|
@ -51,9 +51,8 @@ RUN echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe
|
||||||
RUN sudo apt update
|
RUN sudo apt update
|
||||||
RUN sudo apt install stripe
|
RUN sudo apt install stripe
|
||||||
|
|
||||||
|
# Install code server
|
||||||
|
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
||||||
|
|
||||||
|
|
||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR /workspaces/monorepo
|
WORKDIR /workspaces/monorepo
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
"name": "Basic Python",
|
"name": "Basic Python",
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "one_repo_to_rule_them_all",
|
"service": "one_repo_to_rule_them_all",
|
||||||
"remoteUser": "vscode",
|
// "remoteUser": "vscode",
|
||||||
"workspaceFolder": "/workspaces/monorepo",
|
"workspaceFolder": "/workspaces/monorepo",
|
||||||
"postStartCommand": "bash .devcontainer/post-install.sh",
|
"postStartCommand": "bash .devcontainer/stripe-to-invoice/post-install.sh",
|
||||||
|
"forwardPorts": [8080],
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
// "ghcr.io/devcontainers/features/ssh-agent:1": {}
|
// "ghcr.io/devcontainers/features/ssh-agent:1": {}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,15 @@ version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
one_repo_to_rule_them_all:
|
one_repo_to_rule_them_all:
|
||||||
user: "${UID}:${GID}"
|
# user: "${UID}:${GID}"
|
||||||
build:
|
build:
|
||||||
context: ../..
|
context: ../..
|
||||||
dockerfile: .devcontainer/stripe-to-invoice/Dockerfile
|
dockerfile: .devcontainer/stripe-to-invoice/Dockerfile
|
||||||
command: sleep infinity
|
command: code-server --bind-addr 0.0.0.0:8080 --auth password
|
||||||
|
# command: sleep infinity
|
||||||
volumes:
|
volumes:
|
||||||
- ../..:/workspaces/monorepo
|
- ../..:/workspaces/monorepo
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
cv stripe_to_invoice && npm install;
|
cd stripe_to_invoice && npm install;
|
||||||
62
code-server/codeserver.yaml
Normal file
62
code-server/codeserver.yaml
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
# ======================================================
|
||||||
|
# DEV.JUNTEKIM.COM → LOCALHOST:8080
|
||||||
|
# ======================================================
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: dev-juntekim-external
|
||||||
|
spec:
|
||||||
|
type: ExternalName
|
||||||
|
externalName: host.docker.internal # change if needed
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
name: dev-juntekim-external
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 192.168.0.181
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: dev-juntekim-service
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
selector: {} # no selector — used with external endpoints
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: dev-juntekim-ingress
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
cert-manager.io/cluster-issuer: myresolver
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- dev.juntekim.com
|
||||||
|
secretName: dev-juntekim-tls
|
||||||
|
rules:
|
||||||
|
- host: dev.juntekim.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: dev-juntekim-service
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
Loading…
Add table
Reference in a new issue