build: 🔧 Simplify configs

main
Keith Irwin 2024-04-18 17:52:55 -06:00
parent 4f9bc2f9a4
commit 1c141d83af
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
3 changed files with 79 additions and 14 deletions

View File

@ -1,8 +1,49 @@
# Change network names and IP ranges
# Be sure to change networks: in services below too
#networks:
# monero:
# name: monero
# ipam:
# config:
# - subnet: "172.21.0.0/24"
# mail:
# name: mail
# ipam:
# config:
# - subnet: "172.20.0.0/24"
services:
# monerod:
# image:
# restart: unless-stopped
# Remove profiles: donotstart to start a monerod node
# Warning: This will download the blockchain!
monerod:
profiles:
- donotstart
networks:
monero:
ipv4_address: 172.21.0.1
# Uncomment profiles: donotstart if you already have a dockerized smtp server
# Be sure to change the environment variables in .env if you use this
smtp:
# profiles:
# - donotstart
networks:
monero:
ipv4_address: 172.20.0.1
# Uncomment profiles: donotstart if you already have a
wallet:
environment:
# profiles:
# - donotstart
networks:
monero:
ipv4_address: 172.21.0.2
# This is the main pago server (processor API)
processor:
networks:
monero:
ipv4_address: 172.21.0.10
mail:
ipv4_address: 172.20.0.2

View File

@ -1,16 +1,29 @@
networks:
monero:
name: monero
ipam:
config:
- subnet: "172.21.0.0/24"
mail:
name: mail
ipam:
config:
- subnet: "172.20.0.0/24"
services:
# monerod:
# image:
# restart: unless-stopped
monerod:
image:
restart: unless-stopped
networks:
monero:
ipv4_address: 172.21.0.1
wallet:
image:
restart: unless-stopped
processor:
build: .
restart: unless-stopped
networks:
monero:
ipv4_address: 172.21.0.2
smtp:
image: ghcr.io/crazy-max/msmtpd:latest
@ -24,3 +37,15 @@ services:
- "SMTP_AUTH=off"
- "SMTP_DOMAIN=${MAIL_DOMAIN}"
- "SMTP_FROM=${MAIL_FROM}"
networks:
monero:
ipv4_address: 172.20.0.1
processor:
build: .
restart: unless-stopped
networks:
monero:
ipv4_address: 172.21.0.10
mail:
ipv4_address: 172.20.0.2

View File

@ -5,8 +5,7 @@ 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'
# Change this if you changed the IP in docker-compose.override.yml
MAIL_HOST='172.20.0.1'
# https://nodemailer.com/smtp/
MAIL_URI='smtp://smtp:2500'