forked from PluralFlux/PluralFlux
more correct dockerfile and compose.yaml
This commit is contained in:
10
Dockerfile
Normal file
10
Dockerfile
Normal 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"]
|
||||
38
compose.yaml
38
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:
|
||||
|
||||
Reference in New Issue
Block a user