mirror of
https://github.com/ringtools/ringtools-server-ts.git
synced 2024-05-16 05:44:40 +02:00
Added Docker support files
This commit is contained in:
parent
0f7a91cef2
commit
cf4cd5b277
@ -1,4 +1,4 @@
|
||||
PORT=8080
|
||||
PORT=7464
|
||||
ALLOWED_HOSTS=['*']
|
||||
MACAROON=ABC
|
||||
LND_REST_API=localhost:8080
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM node:16-bullseye-slim
|
||||
|
||||
ARG NODE_ENV=production
|
||||
ENV NODE_ENV=${NODE_ENV}
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package*.json yarn.lock ./
|
||||
|
||||
RUN yarn install --production
|
||||
RUN yarn global add ts-node
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node"]
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
env_file: .env
|
||||
restart: on-failure:5
|
||||
ports:
|
||||
- 7464:7464
|
||||
volumes:
|
||||
- ./:/usr/src/app/
|
||||
entrypoint: ["ts-node", "src/server.ts"]
|
||||
networks:
|
||||
default:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 10.35.14.0/24
|
||||
driver: default
|
@ -1,13 +1,18 @@
|
||||
import 'reflect-metadata';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
import {build} from './app';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const server = build({
|
||||
logger: {
|
||||
level: 'info',
|
||||
level: 'warn',
|
||||
prettyPrint: true,
|
||||
},
|
||||
});
|
||||
|
||||
server.listen(3000, (err, address) => {
|
||||
server.listen(process.env.PORT || 7464, '::', (err, address) => {
|
||||
if (err) {
|
||||
server.log.error(err);
|
||||
process.exit(1);
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "fastify-tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2021",
|
||||
"module": "CommonJS",
|
||||
"experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
"emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
|
||||
|
Loading…
Reference in New Issue
Block a user