This commit is contained in:
louiscklaw
2025-01-31 21:05:22 +08:00
parent e08987a3b3
commit 7e9b533da2
61 changed files with 3781 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# CREDIT: https://github.com/shren207/nextjs-docker-compose
# Dockerfile
FROM node:18-buster
RUN mkdir -p /app/node_modules
RUN chown 1000:1000 -R /app
WORKDIR /app
USER 1000:1000

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ex
npm i
npm run start

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
{
"name": "app",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "http-server --cors ./public"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"http-server": "^14.1.1",
"serve": "^14.2.0"
}
}

View File

@@ -0,0 +1 @@
helloworld siutinchu

View File

@@ -0,0 +1,32 @@
# CREDIT: https://github.com/shren207/nextjs-docker-compose
# CREATED: 03-15-2023
services:
siutinchu_share:
container_name: siutinchu_share
build: .
restart: always
volumes:
- $PWD/app:/app
- siutinchu_node_modules:/app/node_modules
working_dir: /app
# command: sleep infinity
command: bash entry.sh
labels:
- "traefik.enable=true"
- "traefik.http.routers.siutinchu-http.rule=Host(`siutinchu.louislabs.com`)"
- "traefik.http.routers.siutinchu-http.entrypoints=web"
- "traefik.http.routers.siutinchu-http.middlewares=siutinchu-https"
- "traefik.http.middlewares.siutinchu-https.redirectscheme.scheme=https"
- "traefik.http.routers.siutinchu.rule=Host(`siutinchu.louislabs.com`)"
- "traefik.http.routers.siutinchu.entrypoints=websecure"
- "traefik.http.routers.siutinchu.tls.certresolver=myresolver"
- "traefik.http.services.siutinchu.loadbalancer.server.port=8080"
networks:
default:
external:
name: traefik-proxy-network
volumes:
siutinchu_node_modules:

View File

@@ -0,0 +1,13 @@
{
"name": "docker-helloworld",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"into_docker": "docker compose exec -it test bash"
},
"keywords": [],
"author": "",
"license": "ISC"
}

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
git pull
docker compose pull
docker compose build
docker compose kill
docker compose down
docker compose up -d