applied docker patch

pull/15/head
Johannes Bülow 2024-09-17 20:51:00 +02:00
parent 160569003c
commit 52412cea65
Signed by: jmb
GPG Key ID: B56971CF7B8F83A6
4 changed files with 31 additions and 0 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ node_modules
.DS_Store .DS_Store
.vscode .vscode
application/config.js application/config.js
.env

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM node:22
COPY . /home/node/app
RUN chown -R node:node /home/node/app
WORKDIR /home/node/app
USER node
RUN npm i
CMD ["npm", "run", "start"]

View File

@ -76,6 +76,15 @@ WantedBy=multi-user.target
<br><br> <br><br>
- #### Docker:
- `git clone https://github.com/Crazyco-xyz/48hr.email.git`
- `cd 48hr.email`
- Change all settings to the desired values:
- Either use environmental variables, or modify `application/config.js`
- `docker compose up -d`
- If desired, you can also move the config file somewhere else (change volume mount accordingly)
----- -----
### TODO: ### TODO:
- Clean up codebase - Clean up codebase

13
docker-compose.yml Normal file
View File

@ -0,0 +1,13 @@
services:
48hr:
## Map environment variables from file (e.g. for imap password)
#env_file: ./.env
image: localhost/48hr
restart: always
build: .
ports:
- 3000:3000
## Map config file from project to docker container
volumes:
- ./application/config.js:/home/node/app/application/config.js