2025-02-14 20:03:28 +01:00
|
|
|
FROM debian:latest
|
2025-02-05 13:21:00 +01:00
|
|
|
|
2025-02-14 20:03:28 +01:00
|
|
|
# Install dependencies
|
2025-03-19 18:51:26 +01:00
|
|
|
RUN apt-get update
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
|
curl gnupg2 ca-certificates lsb-release apt-transport-https
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
|
postgresql
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
|
caddy
|
|
|
|
|
|
|
|
|
|
RUN apt-get install -y \
|
|
|
|
|
nodejs npm
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN rm -rf /var/lib/apt/lists/*
|
2025-02-05 13:21:00 +01:00
|
|
|
|
2025-02-14 23:37:32 +01:00
|
|
|
RUN echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf && \
|
|
|
|
|
echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf && \
|
|
|
|
|
echo "host all all ::/0 md5" >> /etc/postgresql/15/main/pg_hba.conf
|
|
|
|
|
|
2025-02-19 18:49:10 +01:00
|
|
|
|
|
|
|
|
RUN npm install -g nodemon
|
|
|
|
|
|
2025-02-14 20:03:28 +01:00
|
|
|
# Set up working directory for Express app
|
|
|
|
|
WORKDIR /app
|
2025-02-05 13:21:00 +01:00
|
|
|
COPY package*.json ./
|
|
|
|
|
RUN npm install
|
|
|
|
|
COPY . .
|
|
|
|
|
|
2025-02-14 20:03:28 +01:00
|
|
|
COPY caddy/Caddyfile /etc/caddy/Caddyfile
|
|
|
|
|
|
|
|
|
|
# Copy entrypoint script
|
|
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
|
|
|
|
|
|
|
|
# Expose required ports
|
|
|
|
|
EXPOSE 80 3000 5432
|
2025-02-05 13:21:00 +01:00
|
|
|
|
2025-02-14 20:03:28 +01:00
|
|
|
# Use the entrypoint script to start everything
|
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|