Push further changes to all above
@@ -0,0 +1,42 @@
|
||||
{
|
||||
admin off
|
||||
email {$EMAIL_ADDRESS}
|
||||
acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
grace_period 30s
|
||||
shutdown_delay 60s
|
||||
}
|
||||
|
||||
|
||||
(protect) {
|
||||
@external {
|
||||
not remote_ip private_ranges
|
||||
}
|
||||
abort @external 401
|
||||
}
|
||||
|
||||
*.{$MAIN_DOMAIN} {
|
||||
encode zstd gzip
|
||||
|
||||
handle /ping {
|
||||
@goingDown vars {http.shutting_down} true
|
||||
respond @goingDown "Shutdown in {http.time_until_shutdown}" 503
|
||||
respond "pong" 200
|
||||
}
|
||||
|
||||
handle / {
|
||||
abort
|
||||
}
|
||||
|
||||
handle @stoneedge {
|
||||
reverse_proxy stoneedge:8000
|
||||
}
|
||||
|
||||
handle @stoneedge-staging {
|
||||
import protect
|
||||
abort
|
||||
}
|
||||
|
||||
handle {
|
||||
abort 404
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,19 @@
|
||||
# OpenAssetManager
|
||||
Product for asset documentation for home to big business. Free base-system and non-free (paid) addons.
|
||||
|
||||
Our folder structure:
|
||||
## Products
|
||||
|
||||
All of the projects are located in this project. This is a monorepo. Make sure you have ASDF installed.
|
||||
|
||||
### Web
|
||||
|
||||
All web projects are under `web`, they are react projects.
|
||||
|
||||
### API's
|
||||
Our folder structure for the APIs:
|
||||
```
|
||||
fastapi-project
|
||||
├── alembic/
|
||||
├── migrations/
|
||||
├── src
|
||||
│ ├── auth
|
||||
│ │ ├── router.py # auth main router with all the endpoints
|
||||
@@ -51,5 +60,5 @@ fastapi-project
|
||||
├── .env
|
||||
├── .gitignore
|
||||
├── logging.ini
|
||||
└── alembic.ini
|
||||
└── pyproject.toml
|
||||
```
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
version: "3.7"
|
||||
volumes:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
pg_0_data:
|
||||
pg_1_data:
|
||||
|
||||
services:
|
||||
caddy:
|
||||
container_name: caddy
|
||||
image: docker.io/caddy/caddy:2.9-alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@@ -12,9 +17,15 @@ services:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/ping"]
|
||||
interval: 5m
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
|
||||
fastapi:
|
||||
container_name: "fastapi"
|
||||
stoneedge:
|
||||
container_name: "stoneedge"
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./api/asset_manager
|
||||
@@ -22,15 +33,14 @@ services:
|
||||
ports:
|
||||
- 8000:8000
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/ping"]
|
||||
interval: 5m
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
links:
|
||||
- "postgres"
|
||||
|
||||
pg-0:
|
||||
container_name: "postgres-0"
|
||||
image: docker.io/bitnami/postgresql-repmgr:14
|
||||
ports:
|
||||
- 5432
|
||||
@@ -48,6 +58,7 @@ services:
|
||||
- REPMGR_NODE_NETWORK_NAME=pg-0
|
||||
|
||||
pg-1:
|
||||
container_name: "postgres-1"
|
||||
image: docker.io/bitnami/postgresql-repmgr:14
|
||||
ports:
|
||||
- 5432
|
||||
@@ -65,6 +76,7 @@ services:
|
||||
- REPMGR_NODE_NETWORK_NAME=pg-1
|
||||
|
||||
pgpool:
|
||||
container_name: "pgpool"
|
||||
image: docker.io/bitnami/pgpool:4
|
||||
ports:
|
||||
- 5432:5432
|
||||
@@ -73,7 +85,7 @@ services:
|
||||
- PGPOOL_SR_CHECK_USER=${POSTGRESQL_USERNAME:-user}
|
||||
- PGPOOL_SR_CHECK_PASSWORD=${POSTGRESQL_PASSWORD:-passwd}
|
||||
- PGPOOL_ENABLE_LDAP=no
|
||||
- PGPOOL_POSTGRES_USERNAME=${PGPOOL_POSTGRES_USERNAME}
|
||||
- PGPOOL_POSTGRES_USERNAME=${PGPOOL_POSTGRES_USERNAME:-user}
|
||||
- PGPOOL_POSTGRES_PASSWORD=${POSTGRESQL_ADMIN_PASSWD:-password}
|
||||
- PGPOOL_ADMIN_USERNAME=${PGPOOL_ADMIN_USERNAME:-admin}
|
||||
- PGPOOL_ADMIN_PASSWORD=${PGPOOL_ADMIN_PASSWORD:-adminpassword}
|
||||
@@ -83,6 +95,3 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
caddy_config:
|
||||
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |