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