port docker compose to postgres

This commit is contained in:
theycallhermax 2025-02-28 21:29:48 -05:00
parent d43b844456
commit e888f43ce7
No known key found for this signature in database
GPG key ID: 24D2803F3E25BF2D
3 changed files with 38 additions and 38 deletions

View file

@ -58,7 +58,7 @@
"topic": "" "topic": ""
}, },
"themeStoreUrl": "http://127.0.0.1:8000", "themeStoreUrl": "http://127.0.0.1:8000",
"username": "", "username": "a",
"trimContentAfter": "150", "trimContentAfter": "150",
"charLimit": "512", "charLimit": "512",
"anonName": "Anonymous", "anonName": "Anonymous",

View file

@ -1,38 +1,37 @@
name: catask name: catask
services: services:
mariadb: postgres:
environment: environment:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 1 POSTGRES_DB: catask
MARIADB_DATABASE: catask POSTGRES_USER: catask
MARIADB_USER: catask POSTGRES_PASSWORD: catask
MARIADB_PASSWORD: catask
MARIADB_ROOT_HOST: "%"
healthcheck: healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] test: ["CMD", "pg_isready", "-U", "catask"]
start_period: 10s interval: 1s
interval: 10s
timeout: 5s timeout: 5s
retries: 3 retries: 10
image: mariadb image: postgres:alpine
networks: networks:
- catask - catask
restart: always restart: always
volumes: volumes:
- ./schema.sql:/docker-entrypoint-initdb.d/1.sql - ./schema.sql:/docker-entrypoint-initdb.d/catask.sql
- db-data:/var/lib/mysql - db-data:/var/lib/postgresql/data
catask: catask:
build: build:
dockerfile: Dockerfile dockerfile: Dockerfile
depends_on: depends_on:
mariadb: postgres:
condition: service_healthy condition: service_healthy
networks: networks:
- catask - catask
ports: ports:
- "8000:8000" - "8000:8000"
restart: always
volumes: volumes:
- emoji-data:/catask/static/emojis
- ./config.json:/catask/config.json - ./config.json:/catask/config.json
- ./.env:/catask/.env - ./.env:/catask/.env
@ -42,3 +41,4 @@ networks:
volumes: volumes:
db-data: db-data:
emoji-data:

View file

@ -1,6 +1,6 @@
flask flask
python-dotenv python-dotenv
psycopg psycopg[binary,pool]
humanize humanize
mistune mistune
bleach bleach