fix: docker image

This commit is contained in:
2025-03-21 14:49:51 +00:00
parent 3541a4755c
commit 4ea817e81f
3 changed files with 4 additions and 4 deletions

1
backend/.gitignore vendored
View File

@ -1,3 +1,4 @@
screenmark screenmark
.env.docker .env.docker
.env .env
pgdata

View File

@ -5,12 +5,14 @@ services:
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: password POSTGRES_PASSWORD: password
POSTGRES_DB: haystack
volumes: volumes:
- ./schema.sql:/docker-entrypoint-initdb.d/schema.sql - ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
- ./pgdata:/var/lib/postgresql/data
ports: ports:
- 4321:5432 - 4321:5432
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d haystack_db"] test: ["CMD-SHELL", "pg_isready -U postgres -d haystack"]
interval: 10s interval: 10s
retries: 5 retries: 5
start_period: 5s start_period: 5s

View File

@ -1,6 +1,3 @@
DROP DATABASE IF EXISTS haystack_db;
CREATE DATABASE haystack_db;
DROP SCHEMA IF EXISTS haystack CASCADE; DROP SCHEMA IF EXISTS haystack CASCADE;
CREATE SCHEMA haystack; CREATE SCHEMA haystack;