From 321fe7f0a911fa83a958a9c25140a5f0cde967ab Mon Sep 17 00:00:00 2001 From: Aster Fialla Date: Tue, 17 Feb 2026 17:16:48 -0500 Subject: [PATCH] more correct dockerfile and compose.yaml --- Dockerfile | 10 ++++++++++ compose.yaml | 38 ++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..08de148 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:20-alpine AS builder +WORKDIR /app +COPY package*.json ./ +RUN npm ci --omit=dev + +FROM node:20-alpine +WORKDIR /app +COPY --from=builder /app/node_modules ./node_modules +COPY . . +CMD ["node", "src/bot.js"] \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 8df9cb1..eccef16 100644 --- a/compose.yaml +++ b/compose.yaml @@ -2,6 +2,9 @@ services: main: build: . container_name: pluralflux + restart: unless-stopped + networks: + - pluralflux-net postgres: image: postgres:latest container_name: pluralflux-postgres @@ -13,20 +16,27 @@ services: - pgdata:/var/lib/postgresql ports: - "5432:5432" -# pgadmin: -# image: dpage/pgadmin4:latest -# ports: -# - 5050:80 -# environment: -# # Required by pgAdmin -# PGADMIN_DEFAULT_EMAIL: pieartsy@pm.me -# PGADMIN_DEFAULT_PASSWORD_FILE: /run/secrets/postgres_pwd -# # Don't require the user to login -# PGADMIN_CONFIG_SERVER_MODE: 'False' -# # Don't require a "master" password after logging in -# PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False' -# secrets: -# - postgres_pwd + networks: + - pluralflux-net + pgadmin: + image: dpage/pgadmin4:latest + container_name: pluralflux-pgadmin + ports: + - "5050:80" + environment: + PGADMIN_DEFAULT_EMAIL: code@asterfialla.com + PGADMIN_DEFAULT_PASSWORD_FILE: /run/secrets/postgres_pwd + PGADMIN_CONFIG_SERVER_MODE: 'False' + PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False' + secrets: + - postgres_pwd + depends_on: + - postgres + networks: + - pluralflux-net + +networks: + pluralflux-net: volumes: pgdata: