Browse Source

docker

master
npmrun 2 years ago
parent
commit
3d205d600e
  1. 2
      Dockerfile
  2. 9
      docker-compose.yml
  3. 1
      package.json

2
Dockerfile

@ -21,4 +21,4 @@ RUN pnpm install --frozen-lockfile
EXPOSE 3388
CMD [ "pnpm", "start:docker" ]
CMD [ "pnpm", "start" ]

9
docker-compose.yml

@ -4,15 +4,6 @@ services:
build: .
ports:
- "3388:3388"
environment:
NODE_ENV: production
SQLITE_PATH: /usr/src/app/data/data.db
KEY: dsRhw1Y5UZqB8SjfClbkrX9PF7yuDMV3JItcW0G4vgpaxONo6mzenHLQET2AiKyPUjjdDko10amjPaba
MYSQL_HOST: localhost
MYSQL_PORT: 3306
MYSQL_USER: myuser
MYSQL_PASSWORD: mypassword
MYSQL_DATABASE: mydatabase
volumes:
- ./logs:/usr/src/app/logs
- ./data:/usr/src/app/data

1
package.json

@ -9,7 +9,6 @@
"init": "ts-node --respawn --project ./tsconfig.json -r tsconfig-paths/register source/db/init.ts alter",
"zip": "node script/zip.js",
"build": "tsc && tsc-alias",
"start:docker": "node dist/main.js",
"start": "node -r dotenv/config dist/main.js dotenv_config_path=.env.production",
"dev": "tsx watch -r tsconfig-paths/register -r dotenv/config ./source/main.ts dotenv_config_path=.env.development",
"devb": "ts-node-dev --watch ./source/route --ignore-watch ./source/route/route.txt --respawn --project ./tsconfig.json -r tsconfig-paths/register -r dotenv/config ./source/main.ts dotenv_config_path=.env.development",

Loading…
Cancel
Save