Browse Source

Fix up docker files and add more generic tsconfig files. Also fix run scripts

dev
David Ludwig 4 years ago
parent
commit
2859bcf612
8 changed files with 63 additions and 17 deletions
  1. +48
    -5
      .gitignore
  2. +2
    -1
      Dockerfile
  3. +0
    -4
      docker-compose.dev.yml
  4. +2
    -2
      docker/scripts/export_builds.sh
  5. +2
    -2
      docker/scripts/export_deps.sh
  6. +2
    -2
      package.json
  7. +1
    -1
      tsconfig.json
  8. +6
    -0
      tsconfig.package.json

+ 48
- 5
.gitignore View File

@ -10,14 +10,57 @@
# Node Modules
node_modules/
# Environment varibales
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
.data/
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# TypeScript cache
*.tsbuildinfo
# Optional REPL history
.node_repl_history
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# Environment docker-compose configuration
docker-compose.env.yml
# Built packages
/packages/*/lib
# Built files
dist
build
# Built services
/services/*/dist
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

+ 2
- 1
Dockerfile View File

@ -49,12 +49,13 @@ RUN echo "#!/bin/sh" >> /bin/lerna && \
chmod +x /bin/lerna
# Copy over Lerna stuff
COPY lerna.json package.json tsconfig.json ./
COPY lerna.json package.json tsconfig*.json ./
RUN yarn install
# Symlink the requested service to /app
RUN ln -s /opt/app/services/${SERVICE} /app
WORKDIR /app
CMD [ "yarn", "run", "start:dev" ]
# Build Definitions --------------------------------------------------------------------------------


+ 0
- 4
docker-compose.dev.yml View File

@ -9,7 +9,6 @@ services:
volumes:
- ./packages:/opt/app/packages
- ./services/request:/opt/app/services/request
entrypoint: "/bin/sh"
tty: true
seeker:
@ -18,7 +17,6 @@ services:
volumes:
- ./packages:/opt/app/packages
- ./services/seeker:/opt/app/services/seeker
entrypoint: "/bin/sh"
tty: true
torrent_webui:
@ -29,7 +27,6 @@ services:
volumes:
- ./packages:/opt/app/packages
- ./services/torrent-webui:/opt/app/services/torrent-webui
entrypoint: "/bin/sh"
tty: true
torrent_client:
@ -38,5 +35,4 @@ services:
volumes:
- ./packages:/opt/app/packages
- ./services/torrent-client:/opt/app/services/torrent-client
entrypoint: "/bin/sh"
tty: true

+ 2
- 2
docker/scripts/export_builds.sh View File

@ -3,7 +3,7 @@
# Create the exported directory
mkdir -p build
# Locate services/packages and grab only the built files + package.json
for file in $(find . -regex '.\/\(services\|packages\)\/.*\/\(dist\|lib\)'); do
# Locate services/packages and grab only the built files (excluding types if any)
for file in $(find . -regex '\./\(packages/[^/]+/dist/lib\|services/[^/]+/dist\)'); do
cp --parents -R $file build;
done

+ 2
- 2
docker/scripts/export_deps.sh View File

@ -3,7 +3,7 @@
# Create the exported directory
mkdir -p build
# Locate services/packages and grab only the built files + package.json
for file in $(find . -regex '.\/\(services\|packages\)\/.*\/\(package.json\|node_modules\)'); do
# Locate services/packages and grab only the dependencies + package.json
for file in $(find . -regex '\./\(services\|packages\)/[^/]+/\(package.json\|node_modules\)'); do
cp --parents -R $file build;
done

+ 2
- 2
package.json View File

@ -3,8 +3,8 @@
"private": true,
"scripts": {
"build": "lerna run build",
"build:packages": "lerna run build --scope=@ldt/package-*",
"build:services": "lerna run build --scope=@ldt/service-*",
"build:packages": "lerna run build --scope=@autoplex/*",
"build:services": "lerna run build --scope=@autoplex-service/*",
"export": "rimraf ./build && yarn run export:deps && yarn run export:builds",
"export:deps": "/bin/sh ./docker/scripts/export_deps.sh",
"export:builds": "/bin/sh ./docker/scripts/export_builds.sh"


+ 1
- 1
tsconfig.json View File

@ -21,7 +21,7 @@
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
"downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */


+ 6
- 0
tsconfig.package.json View File

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true
}
}

Loading…
Cancel
Save