Initial commit: Full project structure
- Backend: NestJS with Docker - Frontend: Next.js with Docker - Nginx configuration for reverse proxy - PostgreSQL setup - Docker compose for orchestration - Development environment configuration
This commit is contained in:
21
infrastructure/database/Dockerfile
Normal file
21
infrastructure/database/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM postgres:15-alpine
|
||||
|
||||
# Set timezone
|
||||
ENV TZ=UTC
|
||||
|
||||
# Copy initialization script
|
||||
COPY init.sql /docker-entrypoint-initdb.d/
|
||||
|
||||
# Copy backup script
|
||||
COPY backup.sh /usr/local/bin/backup.sh
|
||||
RUN chmod +x /usr/local/bin/backup.sh
|
||||
|
||||
# Create backup directory
|
||||
RUN mkdir -p /backups && chown postgres:postgres /backups
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
||||
CMD pg_isready -U ${POSTGRES_USER} || exit 1
|
||||
|
||||
# Run as non-root
|
||||
USER postgres
|
||||
Reference in New Issue
Block a user