mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-30 14:18:22 -05:00
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
.git
|
||||
config.json
|
||||
logs
|
||||
certs
|
||||
cdn
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM node:14-alpine
|
||||
|
||||
RUN apk add --no-cache python3 make gcc g++
|
||||
WORKDIR /app
|
||||
|
||||
COPY "docker/entrypoint.sh" .
|
||||
|
||||
COPY package*.json .
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
VOLUME [ "/app/config.json" ]
|
||||
|
||||
CMD ["sh", "entrypoint.sh"]
|
||||
12
docker/entrypoint.sh
Normal file
12
docker/entrypoint.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
files='config.json certs/nex/datastore/secret.key certs/nex/secret.key certs/nex/public.pem'
|
||||
|
||||
for file in $files; do
|
||||
if [ ! -f $file ]; then
|
||||
echo "$PWD/$file file does not exist. Please mount and try again."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exec node src/server.js
|
||||
@@ -3,7 +3,7 @@ const bcrypt = require('bcrypt');
|
||||
const util = require('./util');
|
||||
const { PNID } = require('./models/pnid');
|
||||
const { Server } = require('./models/server');
|
||||
const { mongoose: mongooseConfig } = require('./config.json');
|
||||
const { mongoose: mongooseConfig } = require('../config.json');
|
||||
const { uri, database, options } = mongooseConfig;
|
||||
|
||||
let connection;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const nodemailer = require('nodemailer');
|
||||
const config = require('./config');
|
||||
const config = require('../config.json');
|
||||
|
||||
const transporter = nodemailer.createTransport(config.email);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ const xmlparser = require('./middleware/xml-parser');
|
||||
const database = require('./database');
|
||||
const util = require('./util');
|
||||
const logger = require('../logger');
|
||||
const config = require('./config.json');
|
||||
const config = require('../config.json');
|
||||
|
||||
const { http: { port } } = config;
|
||||
const app = express();
|
||||
|
||||
@@ -8,7 +8,7 @@ const { PNID } = require('../../../../models/pnid');
|
||||
const { NEXAccount } = require('../../../../models/nex-account');
|
||||
const database = require('../../../../database');
|
||||
const util = require('../../../../util');
|
||||
const config = require('../../../../config');
|
||||
const config = require('../../../../../config');
|
||||
|
||||
const PNID_VALID_CHARACTERS_REGEX = /^[\w\-\.]*$/gm;
|
||||
const PNID_PUNCTUATION_START_REGEX = /^[\_\-\.]/gm;
|
||||
|
||||
@@ -2,7 +2,7 @@ const crypto = require('crypto');
|
||||
const NodeRSA = require('node-rsa');
|
||||
const fs = require('fs-extra');
|
||||
const aws = require('aws-sdk');
|
||||
const config = require('./config.json');
|
||||
const config = require('../config.json');
|
||||
|
||||
const spacesEndpoint = new aws.Endpoint('nyc3.digitaloceanspaces.com');
|
||||
const s3 = new aws.S3({
|
||||
|
||||
Reference in New Issue
Block a user