major claude changes
This commit is contained in:
40
.env.example
Normal file
40
.env.example
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# EAMCO Environment Variables
|
||||||
|
# Copy this file to .env and fill in actual values
|
||||||
|
# NEVER commit .env to version control
|
||||||
|
|
||||||
|
# ===========================================
|
||||||
|
# Database Credentials (All Services)
|
||||||
|
# ===========================================
|
||||||
|
POSTGRES_USERNAME=postgres
|
||||||
|
POSTGRES_PW=your_password_here
|
||||||
|
POSTGRES_SERVER=192.168.1.204
|
||||||
|
POSTGRES_PORT=5432
|
||||||
|
POSTGRES_DBNAME=auburnoil
|
||||||
|
|
||||||
|
# ===========================================
|
||||||
|
# Flask Secret Key (eamco_office_api)
|
||||||
|
# ===========================================
|
||||||
|
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
|
||||||
|
SECRET_KEY=your_secret_key_here
|
||||||
|
|
||||||
|
# ===========================================
|
||||||
|
# Authorize.net API Credentials
|
||||||
|
# ===========================================
|
||||||
|
# Production credentials (used by LOCAL and PRODUCTION modes)
|
||||||
|
AUTHORIZE_API_LOGIN_ID=your_api_login_id_here
|
||||||
|
AUTHORIZE_TRANSACTION_KEY=your_transaction_key_here
|
||||||
|
|
||||||
|
# Development/Sandbox credentials (used by DEVELOPMENT mode)
|
||||||
|
AUTHORIZE_API_LOGIN_ID_DEV=your_sandbox_api_login_id_here
|
||||||
|
AUTHORIZE_TRANSACTION_KEY_DEV=your_sandbox_transaction_key_here
|
||||||
|
|
||||||
|
# ===========================================
|
||||||
|
# VoIP.ms Credentials (eamco_voipms)
|
||||||
|
# ===========================================
|
||||||
|
VOIPMS_API_USERNAME=your_voipms_username
|
||||||
|
VOIPMS_API_PASSWORD=your_voipms_password
|
||||||
|
TARGET_DID=your_did_number
|
||||||
|
TARGET_SIP_ACCOUNT=your_sip_account
|
||||||
|
TARGET_CELLPHONE_1=your_cellphone_1
|
||||||
|
TARGET_CELLPHONE_2=your_cellphone_2
|
||||||
|
VOIPMS_API_URL=https://voip.ms/api/v1/rest.php
|
||||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Environment files with secrets
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# Keep the example template
|
||||||
|
!.env.example
|
||||||
@@ -76,6 +76,14 @@ services:
|
|||||||
- ../eamco_authorize:/app
|
- ../eamco_authorize:/app
|
||||||
ports:
|
ports:
|
||||||
- '9516:8000'
|
- '9516:8000'
|
||||||
|
environment:
|
||||||
|
- MODE=DEVELOPMENT
|
||||||
|
- AUTHORIZE_API_LOGIN_ID_DEV=${AUTHORIZE_API_LOGIN_ID_DEV}
|
||||||
|
- AUTHORIZE_TRANSACTION_KEY_DEV=${AUTHORIZE_TRANSACTION_KEY_DEV}
|
||||||
|
- POSTGRES_USERNAME=postgres
|
||||||
|
- POSTGRES_PW=postgres
|
||||||
|
- POSTGRES_SERVER=postgres_dev
|
||||||
|
- POSTGRES_DBNAME=eamco
|
||||||
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
||||||
|
|
||||||
|
|
||||||
@@ -103,3 +111,18 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '9618:8000'
|
- '9618:8000'
|
||||||
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
||||||
|
|
||||||
|
postgres_dev:
|
||||||
|
image: postgres:13
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: eamco
|
||||||
|
ports:
|
||||||
|
- '5432:5432'
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '9611:80'
|
- '9611:80'
|
||||||
|
|
||||||
|
|
||||||
backend_office_local:
|
backend_office_local:
|
||||||
restart: always
|
restart: always
|
||||||
build:
|
build:
|
||||||
@@ -18,8 +17,13 @@ services:
|
|||||||
dockerfile: Dockerfile.local
|
dockerfile: Dockerfile.local
|
||||||
ports:
|
ports:
|
||||||
- '9610:80'
|
- '9610:80'
|
||||||
|
environment:
|
||||||
|
- MODE=LOCAL
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
|
|
||||||
money_service_local:
|
money_service_local:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@@ -28,11 +32,14 @@ services:
|
|||||||
dockerfile: Dockerfile.local
|
dockerfile: Dockerfile.local
|
||||||
environment:
|
environment:
|
||||||
- MODE=LOCAL
|
- MODE=LOCAL
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
ports:
|
ports:
|
||||||
- '9613:8000'
|
- '9613:8000'
|
||||||
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
|
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
|
||||||
|
|
||||||
|
|
||||||
auto_local:
|
auto_local:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
build:
|
||||||
@@ -40,9 +47,14 @@ services:
|
|||||||
dockerfile: Dockerfile.local
|
dockerfile: Dockerfile.local
|
||||||
ports:
|
ports:
|
||||||
- '9614:8000'
|
- '9614:8000'
|
||||||
|
environment:
|
||||||
|
- MODE=LOCAL
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
|
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
|
||||||
|
|
||||||
|
|
||||||
authorize_local:
|
authorize_local:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
build:
|
||||||
@@ -52,9 +64,16 @@ services:
|
|||||||
- ../eamco_authorize:/app
|
- ../eamco_authorize:/app
|
||||||
ports:
|
ports:
|
||||||
- '9616:8000'
|
- '9616:8000'
|
||||||
|
environment:
|
||||||
|
- MODE=LOCAL
|
||||||
|
- AUTHORIZE_API_LOGIN_ID=${AUTHORIZE_API_LOGIN_ID}
|
||||||
|
- AUTHORIZE_TRANSACTION_KEY=${AUTHORIZE_TRANSACTION_KEY}
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
||||||
|
|
||||||
|
|
||||||
voipms_local:
|
voipms_local:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
build:
|
||||||
@@ -64,9 +83,20 @@ services:
|
|||||||
- ../eamco_voipms:/app
|
- ../eamco_voipms:/app
|
||||||
ports:
|
ports:
|
||||||
- '9617:8000'
|
- '9617:8000'
|
||||||
|
environment:
|
||||||
|
- MODE=LOCAL
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
- VOIPMS_API_USERNAME=${VOIPMS_API_USERNAME}
|
||||||
|
- VOIPMS_API_PASSWORD=${VOIPMS_API_PASSWORD}
|
||||||
|
- TARGET_DID=${TARGET_DID}
|
||||||
|
- TARGET_SIP_ACCOUNT=${TARGET_SIP_ACCOUNT}
|
||||||
|
- TARGET_CELLPHONE_1=${TARGET_CELLPHONE_1}
|
||||||
|
- TARGET_CELLPHONE_2=${TARGET_CELLPHONE_2}
|
||||||
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
||||||
|
|
||||||
|
|
||||||
address_checker_local:
|
address_checker_local:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ services:
|
|||||||
context: ../eamco_office_api
|
context: ../eamco_office_api
|
||||||
dockerfile: Dockerfile.prod
|
dockerfile: Dockerfile.prod
|
||||||
ports:
|
ports:
|
||||||
# Expose backend on port 9510
|
|
||||||
- '9510:80'
|
- '9510:80'
|
||||||
environment:
|
environment:
|
||||||
- MODE=PRODUCTION
|
- MODE=PRODUCTION
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
|
|
||||||
# Your other services remain the same
|
|
||||||
# ...
|
|
||||||
|
|
||||||
# Your other services can stay as they are
|
|
||||||
money_service_prod:
|
money_service_prod:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
build:
|
||||||
@@ -31,7 +31,13 @@ services:
|
|||||||
dockerfile: Dockerfile.prod
|
dockerfile: Dockerfile.prod
|
||||||
ports:
|
ports:
|
||||||
- '9513:8000'
|
- '9513:8000'
|
||||||
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
|
environment:
|
||||||
|
- MODE=PRODUCTION
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
command: 'uvicorn main:app --host 0.0.0.0 --port 8000 --workers 2'
|
||||||
|
|
||||||
auto_prod:
|
auto_prod:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@@ -40,9 +46,13 @@ services:
|
|||||||
dockerfile: Dockerfile.prod
|
dockerfile: Dockerfile.prod
|
||||||
ports:
|
ports:
|
||||||
- '9514:8000'
|
- '9514:8000'
|
||||||
command: 'uvicorn main:app --reload --host 0.0.0.0 --port 8000'
|
environment:
|
||||||
|
- MODE=PRODUCTION
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
command: 'uvicorn main:app --host 0.0.0.0 --port 8000 --workers 2'
|
||||||
|
|
||||||
authorize_prod:
|
authorize_prod:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@@ -53,8 +63,15 @@ services:
|
|||||||
- ../eamco_authorize:/app
|
- ../eamco_authorize:/app
|
||||||
ports:
|
ports:
|
||||||
- '9516:8000'
|
- '9516:8000'
|
||||||
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
environment:
|
||||||
|
- MODE=PRODUCTION
|
||||||
|
- AUTHORIZE_API_LOGIN_ID=${AUTHORIZE_API_LOGIN_ID}
|
||||||
|
- AUTHORIZE_TRANSACTION_KEY=${AUTHORIZE_TRANSACTION_KEY}
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
command: 'uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2'
|
||||||
|
|
||||||
voipms_prod:
|
voipms_prod:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@@ -65,8 +82,19 @@ services:
|
|||||||
- ../eamco_voipms:/app
|
- ../eamco_voipms:/app
|
||||||
ports:
|
ports:
|
||||||
- '9517:8000'
|
- '9517:8000'
|
||||||
command: 'uvicorn app.main:app --reload --host 0.0.0.0 --port 8000'
|
environment:
|
||||||
|
- MODE=PRODUCTION
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PW=${POSTGRES_PW}
|
||||||
|
- POSTGRES_SERVER=${POSTGRES_SERVER}
|
||||||
|
- POSTGRES_DBNAME=${POSTGRES_DBNAME}
|
||||||
|
- VOIPMS_API_USERNAME=${VOIPMS_API_USERNAME}
|
||||||
|
- VOIPMS_API_PASSWORD=${VOIPMS_API_PASSWORD}
|
||||||
|
- TARGET_DID=${TARGET_DID}
|
||||||
|
- TARGET_SIP_ACCOUNT=${TARGET_SIP_ACCOUNT}
|
||||||
|
- TARGET_CELLPHONE_1=${TARGET_CELLPHONE_1}
|
||||||
|
- TARGET_CELLPHONE_2=${TARGET_CELLPHONE_2}
|
||||||
|
command: 'uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2'
|
||||||
|
|
||||||
address_checker_prod:
|
address_checker_prod:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
|
|||||||
@@ -1,18 +1,26 @@
|
|||||||
flask
|
# eamco_deploy dependencies
|
||||||
flask_sqlalchemy
|
# Flask web framework
|
||||||
flask_session
|
Flask==3.1.0
|
||||||
flask-login
|
Flask-SQLAlchemy==3.1.1
|
||||||
flask-moment
|
Flask-Session==0.8.0
|
||||||
flask-paranoid
|
Flask-Login==0.6.3
|
||||||
flask-bcrypt
|
Flask-Moment==1.0.6
|
||||||
flask-cors
|
Flask-Paranoid==0.3.0
|
||||||
flask_marshmallow
|
Flask-Bcrypt==1.0.1
|
||||||
gunicorn
|
flask-cors==5.0.1
|
||||||
python-dateutil
|
flask-marshmallow==1.3.0
|
||||||
python-dotenv
|
Flask-WTF==1.2.2
|
||||||
marshmallow-sqlalchemy
|
Flask-Mail==0.10.0
|
||||||
psycopg2-binary
|
|
||||||
redis
|
# Server
|
||||||
sqlalchemy
|
gunicorn==23.0.0
|
||||||
flask_wtf
|
|
||||||
flask_mail
|
# Database
|
||||||
|
SQLAlchemy==2.0.40
|
||||||
|
psycopg2-binary==2.9.10
|
||||||
|
marshmallow-sqlalchemy==1.4.2
|
||||||
|
|
||||||
|
# Utilities
|
||||||
|
python-dateutil==2.9.0.post0
|
||||||
|
python-dotenv==1.1.0
|
||||||
|
redis==6.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user