diff --git a/README.md b/README.md index 9d914df..1d110ad 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ This repo is for containers running on Charles (@ReachableCEO) laptop | application | port | | -------------- | ---- | -| dashboard | 2005 | -| wakaapi | 2001 | -| metrics | 2002 | -| wger | 2003 | -| tube-archivist | 2004 | -| vscode-server | 2006 | -| reactive-resume | 2007 | -| habitica | 2008 | +| (timetracking) wakaapi | 2001 | +| (analytics) metrics | 2002 | +| (workout tracking) wger | 2003 | +| (youtube archiving) tube-archivist | 2004 | +| (dashboard to all my local hosted apps) easy-gate | 2005 | +| (the only editor) vscode-server | 2006 | +| (resume hacking) reactive-resume | 2007 | +| (habit tracking) atomichabits| 2008 | ## Secrets diff --git a/atomichabits/docker-compose.yml b/atomichabits/docker-compose.yml new file mode 100644 index 0000000..b97ae2b --- /dev/null +++ b/atomichabits/docker-compose.yml @@ -0,0 +1,13 @@ +version: '3.8' +services: + tsys-atomichabits: + image: ghcr.io/majorpeter/atomic-tracker:latest + container_name: reachableceo-atomichabits + ports: + - "2008:8080" + volumes: + - tsys-atomichabits:/config + restart: no + +volumes: + tsys-atomichabits: \ No newline at end of file diff --git a/cleanslate/docker-compose.yml b/cleanslate/docker-compose.yml new file mode 100644 index 0000000..adeab70 --- /dev/null +++ b/cleanslate/docker-compose.yml @@ -0,0 +1,88 @@ +services: + database: + image: postgres:15 + restart: always + container_name: database + ports: + - '${POSTGRES_PORT:-5432}:5432' + environment: + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + volumes: + - database:/var/lib/postgresql/data + healthcheck: + test: [ 'CMD-SHELL', 'pg_isready -U postgres'] + interval: 10s + timeout: 5s + retries: 5 + + graphql-server: + image: hasura/graphql-engine:latest.cli-migrations-v3 + restart: always + container_name: graphql-server + ports: + - '${HASURA_PORT:-8080}:8080' + environment: + HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} + HASURA_GRAPHQL_CORS_DOMAIN: https://${NEXT_PUBLIC_HASURA_DOMAIN} + HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@database:5432/postgres + HASURA_GRAPHQL_DEV_MODE: false + HASURA_GRAPHQL_ENABLE_CONSOLE: true + HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log + HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET} + volumes: + - ./migrations:/hasura-migrations + - ./metadata:/hasura-metadata + depends_on: + database: + condition: service_healthy + extra_hosts: + - 'host.docker.internal:host-gateway' + + authentication-server: + image: ghcr.io/successible/cleanslate/authentication-server:latest + build: + context: . + dockerfile: Dockerfile.server + pull_policy: ${PULL_POLICY:-always} + restart: always + container_name: authentication-server + ports: + - '${AUTHENTICATION_SERVER_PORT:-3001}:3001' + environment: + HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} + JWT_SIGNING_SECRET: ${JWT_SIGNING_SECRET} + NEXT_PUBLIC_USE_FIREBASE: ${NEXT_PUBLIC_USE_FIREBASE:-false} + depends_on: + - database + - graphql-server + extra_hosts: + - 'host.docker.internal:host-gateway' + + client: + image: ghcr.io/successible/cleanslate/client:latest + build: + context: . + dockerfile: Dockerfile + args: + - NEXT_PUBLIC_FIREBASE_CONFIG=${NEXT_PUBLIC_FIREBASE_CONFIG:-{}} + - NEXT_PUBLIC_LEGAL_LINK=${NEXT_PUBLIC_LEGAL_LINK:-no} + - NEXT_PUBLIC_LOGIN_WITH_APPLE=${NEXT_PUBLIC_LOGIN_WITH_APPLE:-no} + - NEXT_PUBLIC_LOGIN_WITH_FACEBOOK=${NEXT_PUBLIC_LOGIN_WITH_FACEBOOK:-no} + - NEXT_PUBLIC_LOGIN_WITH_GITHUB=${NEXT_PUBLIC_LOGIN_WITH_GITHUB:-no} + - NEXT_PUBLIC_LOGIN_WITH_GOOGLE=${NEXT_PUBLIC_LOGIN_WITH_GOOGLE:-no} + - NEXT_PUBLIC_REACT_SENTRY_DSN=${NEXT_PUBLIC_REACT_SENTRY_DSN:-no} + - NEXT_PUBLIC_USE_FIREBASE=${NEXT_PUBLIC_USE_FIREBASE:-false} + - NEXT_PUBLIC_VERSION=${NEXT_PUBLIC_VERSION} + pull_policy: ${PULL_POLICY:-always} + restart: always + container_name: client + ports: + - '${CLIENT_PORT:-3000}:3000' + depends_on: + - database + - graphql-server + extra_hosts: + - 'host.docker.internal:host-gateway' + +volumes: + database: diff --git a/webapps/easy-gate/docker-compose.yml b/easy-gate/docker-compose.yml similarity index 80% rename from webapps/easy-gate/docker-compose.yml rename to easy-gate/docker-compose.yml index abf1394..04e0319 100644 --- a/webapps/easy-gate/docker-compose.yml +++ b/easy-gate/docker-compose.yml @@ -1,7 +1,7 @@ services: easy-gate: image: r7wx/easy-gate:latest - container_name: easy-gate + container_name: reachableceo-easy-gate restart: always ports: - 2005:8080 diff --git a/webapps/easy-gate/easy-gate.json b/easy-gate/easy-gate.json similarity index 92% rename from webapps/easy-gate/easy-gate.json rename to easy-gate/easy-gate.json index c969c5c..f1d8261 100644 --- a/webapps/easy-gate/easy-gate.json +++ b/easy-gate/easy-gate.json @@ -44,6 +44,11 @@ "name": "VsCode Server", "category": "", "url": "http://tsys1:2006", + }, + { + "name": "Atomic Habits", + "category": "", + "url": "http://tsys1:2008" } ], "notes": [ diff --git a/utility/metrics/docker-compose.yml b/metrics/docker-compose.yml similarity index 79% rename from utility/metrics/docker-compose.yml rename to metrics/docker-compose.yml index a22c087..ae68004 100644 --- a/utility/metrics/docker-compose.yml +++ b/metrics/docker-compose.yml @@ -1,8 +1,7 @@ -version: '3.8' services: metrics: image: ghcr.io/lowlighter/metrics:latest - container_name: metrics + container_name: reachableceo-metrics entrypoint: "" command: ["npm", "start"] ports: diff --git a/utility/metrics/metrics.sh b/metrics/metrics.sh similarity index 100% rename from utility/metrics/metrics.sh rename to metrics/metrics.sh diff --git a/utility/metrics/settings.json b/metrics/settings.json similarity index 100% rename from utility/metrics/settings.json rename to metrics/settings.json diff --git a/webapps/reactive-resume/docker-compose.yml b/reactive-resume/docker-compose.yml similarity index 100% rename from webapps/reactive-resume/docker-compose.yml rename to reactive-resume/docker-compose.yml diff --git a/vscode-server/docker-compose.yml b/vscode-server/docker-compose.yml new file mode 100644 index 0000000..2198754 --- /dev/null +++ b/vscode-server/docker-compose.yml @@ -0,0 +1,12 @@ +services: + tsys-vscode-server: + image: gitpod/openvscode-server + container_name: reachableceo-vscode-server + restart: always + ports: + - 2006:3000 + volumes: + - tsys-vscode-server:/home/workspace:cached + +volumes: + tsys-vscode-server: \ No newline at end of file diff --git a/utility/wakaapi/docker-compose.yml b/wakaapi/docker-compose.yml similarity index 79% rename from utility/wakaapi/docker-compose.yml rename to wakaapi/docker-compose.yml index 6de2521..b422036 100644 --- a/utility/wakaapi/docker-compose.yml +++ b/wakaapi/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.8' services: wakaapi-tsys: image: ghcr.io/muety/wakapi:latest - container_name: wakaapi-tsys + container_name: reachableceo-wakaapi environment: - WAKAPI_PASSWORD_SALT=1234 volumes: diff --git a/utility/wakaapi/wakaapi.sh b/wakaapi/wakaapi.sh similarity index 100% rename from utility/wakaapi/wakaapi.sh rename to wakaapi/wakaapi.sh diff --git a/webapps/beaverhabits/docker-compose.yml b/webapps/beaverhabits/docker-compose.yml deleted file mode 100644 index 556eeeb..0000000 --- a/webapps/beaverhabits/docker-compose.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: '3.8' -services: - beaverhabits: - image: daya0576/beaverhabits:latest - container_name: beaverhabits - environment: - - FIRST_DAY_OF_WEEK=0 - - HABITS_STORAGE=USER_DISK - - MAX_USER_COUNT=1 - volumes: - - /path/to/host/directory:/app/.user/ - ports: - - "8080:8080" - restart: unless-stopped \ No newline at end of file diff --git a/webapps/habitica/docker-compose.yml b/webapps/habitica/docker-compose.yml deleted file mode 100644 index 9def471..0000000 --- a/webapps/habitica/docker-compose.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: "3" -services: - - client: - build: . - networks: - - habitica - environment: - - BASE_URL=http://tsys1:2008 - ports: - - "2008:8080" - command: ["npm", "run", "client:dev"] - depends_on: - - server - - server: - build: . - ports: - - "3008:3000" - networks: - - habitica - environment: - - NODE_DB_URI=mongodb://mongo/habitrpg - depends_on: - - mongo - - mongo: - image: mongo:3.6 - ports: - - "27017:27017" - networks: - - habitica - -networks: - habitica: - driver: bridge \ No newline at end of file diff --git a/webapps/vscode-server/docker-compose.yml b/webapps/vscode-server/docker-compose.yml deleted file mode 100644 index 325f010..0000000 --- a/webapps/vscode-server/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -services: - tsys-vscode-server: - image: gitpod/openvscode-server - container_name: tsys-vscode-server - restart: always - ports: - - 2006:8080 - volumes: - - tsys-vscode-server:/home/workspace:cached \ No newline at end of file diff --git a/wger/docker-compose.yml b/wger/docker-compose.yml new file mode 100644 index 0000000..78ae18d --- /dev/null +++ b/wger/docker-compose.yml @@ -0,0 +1,117 @@ +# +# Please consult the `Deployment` section in the readme if you want to deploy +# this. You *need* to keep this nginx service, even if you have your own, +# otherwise the static files will not be served correctly! If you do remove +# it, configure yours similarly to what's in config/nginx.conf +# Also take a look at the "Static files" section in the .env file + +services: + web: + image: wger/server:latest + depends_on: + db: + condition: service_healthy + cache: + condition: service_healthy + env_file: + - ./config/prod.env + volumes: + - static:/home/wger/static + expose: + - 8000 + healthcheck: + test: wget --no-verbose --tries=1 --spider http://localhost:2003 + interval: 10s + timeout: 5s + start_period: 300s + retries: 5 + restart: unless-stopped + + nginx: + image: nginx:stable + depends_on: + - web + volumes: + - ./config/nginx.conf:/etc/nginx/conf.d/default.conf + - static:/wger/static:ro + - media:/wger/media:ro + ports: + - "80:80" + healthcheck: + test: service nginx status + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + restart: unless-stopped + + db: + image: postgres:15-alpine + environment: + - POSTGRES_USER=wger + - POSTGRES_PASSWORD=wger + - POSTGRES_DB=wger +# volumes: +# - postgres-data:/var/lib/postgresql/data/ + expose: + - 5432 + healthcheck: + test: pg_isready -U wger + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + restart: unless-stopped + + cache: + image: redis + expose: + - 6379 + volumes: + - redis-data:/data + healthcheck: + test: redis-cli ping + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + restart: unless-stopped + + celery_worker: + image: wger/server:latest + command: /start-worker + env_file: + - ./config/prod.env + volumes: + - media:/home/wger/media + depends_on: + web: + condition: service_healthy + healthcheck: + test: celery -A wger inspect ping + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + + celery_beat: + image: wger/server:latest + command: /start-beat + volumes: + - celery-beat:/home/wger/beat/ + env_file: + - ./config/prod.env + depends_on: + celery_worker: + condition: service_healthy + +volumes: + postgres-data: + celery-beat: + static: + media: + redis-data: + +networks: + default: + name: wger_network