build: 🏗️ Added docker files, gitignore, and env

main
Keith Irwin 2024-04-18 11:53:03 -06:00
parent 63d35924a8
commit 4f9bc2f9a4
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
6 changed files with 56 additions and 4 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
node_modules/
.env
docker-compose.override.yml

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM node:lts
WORKDIR /usr/local/src
COPY package*.json ./
RUN npm ci --omit=dev
COPY . .
EXPOSE 80
ENTRYPOINT ["npm", "run", "--"]

View File

@ -0,0 +1,8 @@
services:
# monerod:
# image:
# restart: unless-stopped
wallet:
environment:

26
docker-compose.yml Normal file
View File

@ -0,0 +1,26 @@
services:
# monerod:
# image:
# restart: unless-stopped
wallet:
image:
restart: unless-stopped
processor:
build: .
restart: unless-stopped
smtp:
image: ghcr.io/crazy-max/msmtpd:latest
domainname: ${MAIL_DOMAIN}
restart: unless-stopped
environment:
- "TZ=${TIMEZONE}"
- "SMTP_HOST=${MAIL_HOST}"
- "SMTP_TLS=off"
- "SMTP_STARTTLS=off"
- "SMTP_AUTH=off"
- "SMTP_DOMAIN=${MAIL_DOMAIN}"
- "SMTP_FROM=${MAIL_FROM}"

View File

@ -4,10 +4,6 @@
require('dotenv').config()
const axios = require('axios')
const express = require('express')
const CORS_OPTIONS = {
'origin': process.env.WWW_DOMAIN,
'methods': 'GET,POST,PUT,OPTIONS,DELETE',
}
const jsonBodyParser = express.json()
// Server

12
sample.env Normal file
View File

@ -0,0 +1,12 @@
ENVIRONMENT='staging'
#ENVIRONMENT='prod'
TIMEZONE='UTC'
# Email
MAIL_DOMAIN='example.com'
MAIL_FROM='noreply@example.com'
# To use the host's mailserver from docker, set MAIL_HOST with the output of this command on the host
# ip addr show dev docker0 | grep inet | awk '{print $2}' | cut -d'/' -f1
MAIL_HOST='172.17.0.1'
# https://nodemailer.com/smtp/
MAIL_URI='smtp://smtp:2500'