Started to add docker

This commit is contained in:
E 2021-02-14 21:56:24 +00:00
parent be533def79
commit 32bdec59fe
No known key found for this signature in database
GPG Key ID: F56420981740B50B
12 changed files with 2926 additions and 124 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
node_modules/
logs/
.git/
.gitignore
dockerfile
README.md

8
.idea/.gitignore vendored
View File

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
</component>
</project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/pastel.codes.iml" filepath="$PROJECT_DIR$/.idea/pastel.codes.iml" />
</modules>
</component>
</project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -14,6 +14,7 @@ var http = require('http');
var port = normalizePort(process.env.PORT || '7000');
app.set('port', port);
console.log(port)
/**
* Create HTTP server.

18
dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:15.8.0
ENV PORT=
ENV NODE_ENV=
ENV GHOST_KEY=
ENV HCAPTCHA_KEY=
ENV SENDGRID_API_KEY=
ENV TO_MAIL_USER=
ENV REPLY_TO_MAIL=
ENV FROM_MAIL_USER=
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
COPY . .
CMD [ "npm", "start" ]
EXPOSE 7000/tcp

2949
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +0,0 @@
[Unit]
Description="pastel.codes web service"
Documentation=https://pastel.codes.com
After=network.target
[Service]
Environment=PORT=7000
Environment=NODE_ENV=production
Environment=GHOST_KEY=key
Environment=HCAPTCHA_KEY=key
Environment=SENDGRID_API_KEY=key
Environment=TO_MAIL_USER=user
Environment=REPLY_TO_MAIL=user
Environment=FROM_MAIL_USER=user
StandardOutput=syslog
SyslogIdentifier=pastel-codes
User=web
ExecStart=/home/web/pastel.codes/bin/www
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>