This commit is contained in:
louiscklaw
2025-01-31 19:28:21 +08:00
parent ce9a4aa9b3
commit 72bacdd6b5
168 changed files with 939668 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# CREDIT: https://github.com/shren207/nextjs-docker-compose
# Dockerfile
FROM node:18-buster

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,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
helloworld
</body>
</html>

View File

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

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,11 @@
#!/usr/bin/env bash
set -ex
git pull
docker compose pull
docker compose build
docker compose kill
docker compose down
docker compose up -d