update,
This commit is contained in:
9
siutinchu/docker-share/Dockerfile
Normal file
9
siutinchu/docker-share/Dockerfile
Normal 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
|
5
siutinchu/docker-share/app/entry.sh
Normal file
5
siutinchu/docker-share/app/entry.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
npm i
|
||||
npm run start
|
2117
siutinchu/docker-share/app/package-lock.json
generated
Normal file
2117
siutinchu/docker-share/app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
siutinchu/docker-share/app/package.json
Normal file
17
siutinchu/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"
|
||||
}
|
||||
}
|
1
siutinchu/docker-share/app/public/index.html
Normal file
1
siutinchu/docker-share/app/public/index.html
Normal file
@@ -0,0 +1 @@
|
||||
helloworld siutinchu
|
32
siutinchu/docker-share/docker-compose.yml
Normal file
32
siutinchu/docker-share/docker-compose.yml
Normal 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:
|
13
siutinchu/docker-share/package.json
Normal file
13
siutinchu/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"
|
||||
}
|
9
siutinchu/docker-share/up.sh
Normal file
9
siutinchu/docker-share/up.sh
Normal 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
|
Reference in New Issue
Block a user