more correct dockerfile and compose.yaml

This commit is contained in:
Aster Fialla
2026-02-17 17:16:48 -05:00
parent 0a4bfa59ad
commit 321fe7f0a9
2 changed files with 34 additions and 14 deletions

10
Dockerfile Normal file
View File

@@ -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"]

View File

@@ -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: