FROM nginx:alpine

# Create directories for SSL certificates
RUN mkdir -p /etc/ssl/certs /etc/ssl/private

# Copy SSL certificates
COPY nginx.crt /etc/ssl/certs/
COPY nginx.key /etc/ssl/private/

# Set proper permissions for private key
RUN chmod 600 /etc/ssl/private/nginx.key

# Copy nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf

# Expose HTTPS port
EXPOSE 7009

CMD ["nginx", "-g", "daemon off;"]