Skip to content

Commit

Permalink
🐳 Docker: work on compose file, add tasks, DnD
Browse files Browse the repository at this point in the history
  • Loading branch information
k33g committed Jan 20, 2024
1 parent 7f109cb commit 5c2ef71
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ CODER_ARCH=arm64
CODER_HTTP_PORT=4000
USER_NAME=simplism
# Add this to your hosts file: 0.0.0.0 ide.simplism.cloud
LOCAL_DOMAIN=ide.simplism.cloud
TLS_CERT=ide.simplism.cloud.crt
TLS_CERT_KEY=ide.simplism.cloud.key

18 changes: 18 additions & 0 deletions .tasks/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# ------------------------------------
# Install Code Server Extensions
# ------------------------------------
code-server --install-extension wesbos.theme-cobalt2
code-server --install-extension PKief.material-icon-theme
code-server --install-extension PKief.material-product-icons
code-server --install-extension golang.go
code-server --install-extension rust-lang.rust-analyzer
code-server --install-extension aaron-bond.better-comments
code-server --install-extension GitHub.github-vscode-theme
code-server --install-extension huytd.github-light-monochrome

echo "🌍 open: http://0.0.0.0:${CODER_HTTP_PORT}"
echo "🔐 if you activated https mode:"
echo "🌍 open: https://${LOCAL_DOMAIN}:${CODER_HTTP_PORT}"

23 changes: 19 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Simplism
services:
app:
simplism-project:
container_name: ${CONTAINER_NAME}
# https
entrypoint: ["code-server", "--cert", "/${WORKDIR}/certs/${TLS_CERT}", "--cert-key", "/${WORKDIR}/certs/${TLS_CERT_KEY}", "--auth", "none", "--host", "0.0.0.0", "--port", "${CODER_HTTP_PORT}", "/${WORKDIR}"]
# http
#entrypoint: ["code-server", "--auth", "none", "--host", "0.0.0.0", "--port", "${CODER_HTTP_PORT}", "/${WORKDIR}"]
environment:
environment: &env
- ABOUT="Simplism Environment with Coder"
- XDG_DATA_HOME=/${WORKDIR}/.config
build:
- CODER_HTTP_PORT=${CODER_HTTP_PORT}
# used by the https mode
- LOCAL_DOMAIN=${LOCAL_DOMAIN}
- TLS_CERT=${TLS_CERT}
- TLS_CERT_KEY=${TLS_CERT_KEY}
build: &build
args:
- GO_ARCH=${GO_ARCH}
- GO_VERSION=${GO_VERSION}
Expand Down Expand Up @@ -40,5 +45,15 @@ services:
source: /var/run/docker.sock
target: /var/run/docker.sock
ports:
- 4000:4000 # Code Server HTTP port
- ${CODER_HTTP_PORT}:${CODER_HTTP_PORT} # Code Server HTTP port
- 8080:8080

simplism-project-tasks:
depends_on:
- simplism-project
container_name: ${CONTAINER_NAME}-tasks
entrypoint: ["/${WORKDIR}/.tasks/init.sh"]
environment: *env
build: *build
volumes:
- .:/${WORKDIR}

0 comments on commit 5c2ef71

Please sign in to comment.