cleanup for the docker setup

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-01-18 03:31:37 +03:00
parent ecaa6fb68f
commit fa2f3acb35
34 changed files with 433 additions and 319 deletions

50
deploy/compose.yml Normal file
View File

@ -0,0 +1,50 @@
services:
app:
container_name: "website_app"
image: website_app
build:
context: ./app
args:
WEBSITE_SOURCE_URL: http://github.com/ngn13/website
WEBSITE_REPORT_URL: http://github.com/ngn13/website/issues
WEBSITE_APP_URL: http://localhost:7001
WEBSITE_API_URL: http://localhost:7002
WEBSITE_DOC_URL: http://doc:7003
security_opt:
- "no-new-privileges:true"
cap_drop:
- ALL
ports:
- "127.0.0.1:7001:7001"
restart: unless-stopped
depends_on:
- api
- doc
api:
container_name: "website_api"
image: website_api
build:
context: ./api
security_opt:
- "no-new-privileges:true"
cap_drop:
- ALL
ports:
- "127.0.0.1:7002:7002"
volumes:
- ./data.db:/api/data.db:rw
restart: unless-stopped
environment:
WEBSITE_PASSWORD: change_me
doc:
container_name: "website_doc"
image: website_doc
build:
context: ./doc
security_opt:
- ano-new-privileges:true
cap_drop:
- ALL
restart: unless-stopped

9
deploy/run.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [ ! -f data.db ]; then
touch data.db
sudo chmod 1001:1001 data.db
fi
docker-compose build
docker-compose up -d