update,
This commit is contained in:
3
barbarbar/docker-share/Dockerfile
Normal file
3
barbarbar/docker-share/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
# CREDIT: https://github.com/shren207/nextjs-docker-compose
|
||||
# Dockerfile
|
||||
FROM node:18-buster
|
5
barbarbar/docker-share/app/entry.sh
Normal file
5
barbarbar/docker-share/app/entry.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
npm i
|
||||
npm run start
|
2117
barbarbar/docker-share/app/package-lock.json
generated
Normal file
2117
barbarbar/docker-share/app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
barbarbar/docker-share/app/package.json
Normal file
17
barbarbar/docker-share/app/package.json
Normal 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"
|
||||
}
|
||||
}
|
12
barbarbar/docker-share/app/public/index.html
Normal file
12
barbarbar/docker-share/app/public/index.html
Normal 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>
|
28
barbarbar/docker-share/docker-compose.yml
Normal file
28
barbarbar/docker-share/docker-compose.yml
Normal 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
|
13
barbarbar/docker-share/package.json
Normal file
13
barbarbar/docker-share/package.json
Normal 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"
|
||||
}
|
11
barbarbar/docker-share/up.sh
Normal file
11
barbarbar/docker-share/up.sh
Normal 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
|
Reference in New Issue
Block a user