generated from oci/template
Some checks failed
Build Docker Image on Commit / build-and-publish (push) Failing after 7s
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
FROM postgres:16.6
|
|
|
|
# Metadata
|
|
LABEL maintainer="TAK Server Docker Setup"
|
|
LABEL description="PostgreSQL with PostGIS for TAK Server"
|
|
LABEL version="1.0"
|
|
|
|
# Install required packages
|
|
RUN apt-get update && apt-get install -y \
|
|
postgresql-16-postgis-3 \
|
|
openjdk-17-jdk \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create necessary directories
|
|
RUN mkdir -p /opt/tak/db-utils \
|
|
&& mkdir -p /opt/tak/logs
|
|
|
|
# Copy database utilities and configuration
|
|
COPY data/takserver/db-utils/ /opt/tak/db-utils/
|
|
COPY config/postgres/ /docker-entrypoint-initdb.d/
|
|
|
|
# Set proper permissions
|
|
RUN chmod +x /opt/tak/db-utils/*.sh \
|
|
&& chmod +x /docker-entrypoint-initdb.d/*.sh
|
|
|
|
# Set environment variables with defaults (passwords should be set at runtime)
|
|
ENV POSTGRES_DB=cot \
|
|
POSTGRES_USER=martiuser
|
|
|
|
# Note: POSTGRES_PASSWORD should be set at runtime via docker-compose or container environment
|
|
# Note: Authentication method should be configured via PostgreSQL configuration files
|
|
|
|
# Expose PostgreSQL port
|
|
EXPOSE 5432
|
|
|
|
# Custom entrypoint that initializes TAK database
|
|
ENTRYPOINT ["/opt/tak/db-utils/configureInDocker.sh"]
|