This commit is contained in:
louiscklaw
2025-01-31 19:24:26 +08:00
parent 4afadb4bfd
commit ad92aa80a9
3382 changed files with 882279 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,27 @@
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<title>ddmseoul</title>
</head>
<body>
<div>
<h2>wordpress demo</h2>
<div>
<div>wordpress demo</div>
<a href="//www.google.com">www.google.com</a>
</div>
</div>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -0,0 +1,33 @@
# CREDIT: https://github.com/shren207/nextjs-docker-compose
services:
ddmseoul_share:
container_name: ddmseoul_share
build: .
restart: always
volumes:
- ./app:/app
- ddmseoul_node_modules:/app/node_modules
working_dir: /app
# command: sleep infinity
command: bash entry.sh
ports:
- 8080
labels:
- "traefik.enable=true"
- "traefik.http.routers.ddmseoul-http.rule=Host(`ddmseoul.louislabs.com`)"
- "traefik.http.routers.ddmseoul-http.entrypoints=web"
- "traefik.http.routers.ddmseoul-http.middlewares=ddmseoul-https"
- "traefik.http.middlewares.ddmseoul-https.redirectscheme.scheme=https"
- "traefik.http.routers.ddmseoul.rule=Host(`ddmseoul.louislabs.com`)"
- "traefik.http.routers.ddmseoul.entrypoints=websecure"
- "traefik.http.routers.ddmseoul.tls.certresolver=myresolver"
- "traefik.http.services.ddmseoul.loadbalancer.server.port=8080"
networks:
default:
external:
name: traefik-proxy-network
volumes:
ddmseoul_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,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