Skip to main content
Version: 2.0.0

๐Ÿณ Deploy with Docker

This article will help you to deploy your notification service with docker.

๐Ÿ—๏ธ Preparation#

Make sure that you ...

  1. have have Docker and Docker Compose installed.
  2. have a .env file from these steps.

๐Ÿ†™ Deploy your container#

  1. Create a new folder and copy/paste your .env file here. This folder will store any data that needs to be persistent like the database.
  2. In this folder, create a file named docker-compose.yml with the following content:
version: '3.1'
services:
mongo:
image: mongo
restart: always
volumes:
- ./database:/data/db
notification-service:
image: tjarbo/notification-service:next
restart: unless-stopped
ports:
- 8080:4040
links:
- mongo
env_file:
- .env
environment:
MONGO_HOST: mongodb://mongo:27017/notification-service
# Uncomment the following lines to store logs independently from container.
# volumes:
# Requires env: 'LOG_TO_FILE: true'
# - ./logs:/usr/src/app/log
  1. Open the command line, navigate to your new created folder and enter the command docker-compose up -d.
note

The compose file currently uses the next tagged docker image that is based on the main branch but maybe unstable. After the first release of version 2, you can change this to tjarbo/notification-service:latest.

โœ… Done!#

That's it! You have successfully deployed your own notification service.

info

If you plan to make the notification service public accessible, please be aware that the notification service is not managing any ssl certificates! You can use applications like the Secure Web Application Gateway by LinuxServer.io or the NGINX Proxy Manger, but we are unable to provide any help in this case!

๐Ÿ“œ Access logs#

Use the following command to access the logs: docker-compose logs --timestamps notification-service.