FROM nginx:1.27-alpine
ARG COOLIFY_URL=https://auraajenticai.cloud
ARG COOLIFY_FQDN=auraajenticai.cloud
ARG COOLIFY_BRANCH=main
ARG COOLIFY_RESOURCE_UUID=q2kkhvkrpdm6ukj20gv69tuk
ARG COOLIFY_BUILD_SECRETS_HASH=9746bc7c95f27bde3e046891d8dc7536f6eaeae16d3a239f6a3c9c48a0cb15c4

# Remove default config
RUN rm /etc/nginx/conf.d/default.conf

# Copy our nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Copy all site files
COPY . /usr/share/nginx/html/

EXPOSE 80

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD wget -qO- http://127.0.0.1:80/ > /dev/null || exit 1

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