mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-21 13:56:19 +01:00
Add docker support
This commit is contained in:
parent
cbc29cfba4
commit
519238a49e
4 changed files with 54 additions and 0 deletions
13
.env.example
Normal file
13
.env.example
Normal file
|
@ -0,0 +1,13 @@
|
|||
URL = http://127.0.0.1:9286
|
||||
HOST = localhost
|
||||
PORT = 9286
|
||||
DB_HOST =
|
||||
DB_USER =
|
||||
DB_PASSWORD =
|
||||
DB_NAME =
|
||||
DB_TIMEOUT =
|
||||
MAIL_HOST =
|
||||
MAIL_PORT =
|
||||
MAIL_USER =
|
||||
MAIL_PASSWORD =
|
||||
TG_BOT_TOKEN =
|
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
|||
FROM node:16.20
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
|
||||
ARG PORT
|
||||
EXPOSE ${PORT}
|
||||
|
||||
CMD [ "node", "index.js" ]
|
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
version: '3.9'
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
restart: always
|
||||
container_name: nekoya_web
|
||||
env_file: .env
|
||||
environment:
|
||||
URL: ${URL}
|
||||
HOST: ${HOST}
|
||||
PORT: ${PORT}
|
||||
DB_HOST: ${DB_HOST}
|
||||
DB_USER: ${DB_USER}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
DB_NAME: ${DB_NAME}
|
||||
DB_TIMEOUT: ${DB_TIMEOUT}
|
||||
MAIL_HOST: ${MAIL_HOST}
|
||||
MAIL_PORT: ${MAIL_PORT}
|
||||
MAIL_USER: ${MAIL_USER}
|
||||
MAIL_PASSWORD: ${MAIL_PASSWORD}
|
||||
TG_BOT_TOKEN: ${TG_BOT_TOKEN}
|
||||
ports:
|
||||
- "9286:9286"
|
Loading…
Reference in a new issue