docker cp "C:\Program Files\MongoDB\Tools\100\bin\dump\you_need" b2fb5a13f4d8:/bin
Error: No such container:path: b2fb5a13f4d8:\
const esbuild = require('esbuild');
const { nodeExternalsPlugin } = require('esbuild-node-externals');
const dotenv = require('dotenv').config()
esbuild.build({
entryPoints: ['./src/main.ts'],
bundle: true,
platform: 'node',
tsconfig: "tsconfig.json",
define: {
"process.env.JWT_SECRET": "\"supercat\"",
"process.env.PORT": "\"4000\"",
"process.env.HOST": "\"http://localhost:4200\"",
"process.env.MONGO_IP_PROD": `\"${process.env.MONGO_IP_PROD}\"`
},
minify: true,
outfile: '../../dist/backend/server.js',
plugins: [nodeExternalsPlugin()],
});
my-mongoserver:
# build will get tagged with 'image'
image: 259ecd4a0a0e
container_name: my-mongoserver
ports:
- 4000:4000
command: node dist/backend/server.js
environment:
- MONGO_IP_PROD=my-mongodb
networks:
- test
depends_on:
- my-mongodb
servers: Map(1) {
my-mongoserver | 'undefined:27017' => ServerDescription {
my-mongoserver | address: 'undefined:27017',
os.env('MONGO_IP_PROD')
System.getenv("MONGO_IP_PROD");