Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ FROM node:${DEBIAN_VERSION_TAG} AS builder-debian
RUN apt-get update && apt-get install -y \
build-essential=12.9 \
python3=3.11.2-1+b1 \
sqlite3=3.40.1-2+deb12u1 \
libsqlite3-dev=3.40.1-2+deb12u1 \
sqlite3 \
libsqlite3-dev \
make=4.3-4.1 \
node-gyp=9.3.0-2 \
g++=4:12.2.0-3 \
Expand Down Expand Up @@ -77,7 +77,7 @@ FROM node:${DEBIAN_VERSION_TAG} AS final-debian
# TODO: Consider adding `--no-install-recommends`, but will need testing (may further help reduce final build size)
RUN apt-get update && apt-get install -y \
iputils-ping=3:20221126-1+deb12u1 \
sqlite3=3.40.1-2+deb12u1 \
sqlite3 \
tzdata \
# TODO: Is it ok to change to `curl` here so that we don't have to maintain `wget` version mismatch between Debian architectures? (`curl` is only used for the container healthcheck and because there is an Alpine variant (best!) we probably don't care if the Debian image ends up building bigger due to `curl`.)
curl && \
Expand Down
46 changes: 23 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ version: '3.8'

services:
kener:
image: rajnandan1/kener:latest # Change to 'rajnandan1/kener:alpine' for an even smaller image! 😁🚀
build: .
container_name: kener
# env_file: custom.env # Uncomment this if you are needing to export environment variables from a custom environment file. By default, Docker will import any variables that exist in `.env`
environment:
TZ: Etc/UTC
KENER_SECRET_KEY: replace_me_with_a_random_string # Keep private!! - best to define in `.env` file or through Docker Secret
env_file: .env # Uncomment this if you are needing to export environment variables from a custom environment file. By default, Docker will import any variables that exist in `.env`
#environment:
# TZ: America/Sao_Paulo
# KENER_SECRET_KEY: # Keep private!! - best to define in `.env` file or through Docker Secret
# DATABASE_URL: custom_db_url # By default, a SQLite database is used - you may override the database url/type here
# RESEND_API_KEY:
# RESEND_SENDER_EMAIL:
Expand All @@ -28,33 +28,33 @@ services:
- '3000:3000/tcp'
volumes:
- data:/app/database # We suggest using a Docker named volume, which is more performant for databases
- $(pwd)/uploads:/app/uploads
- ./uploads:/app/uploads
# read_only: true # Uncommenting this fortifies security by marking the container's filesystem as read-only (aka no data can be written to the container's filesystem except for explicitly defined writable volumes and bind mounts, an exception has already been defined for `/database` and `/uploads`)
restart: unless-stopped
# depends_on: # <-- Uncomment if you would like to use PostgreSQL or MySQL
# - postgres # ...instead of SQLite
# - mysql #

# Only use below section if you would like to utilize PostgreSQL instead of Kener's default SQLite database. (Don't forget to set `DATABASE_URL` in `kener` service to be: `DATABASE_URL=postgresql://db_user:db_password@localhost:5432/kener_db`)
postgres:
image: postgres:alpine
container_name: postgres
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: some_super_random_secure_password # Best to define this in `.env` or via Docker Secret!!
POSTGRES_DB: kener_db
restart: unless-stopped
# postgres:
# image: postgres:alpine
# container_name: postgres
# environment:
# POSTGRES_USER: user
# POSTGRES_PASSWORD: some_super_random_secure_password # Best to define this in `.env` or via Docker Secret!!
# POSTGRES_DB: kener_db
# restart: unless-stopped

# Only use below section if you would like to utilize MySQL instead of Kener's default SQLite database. (Don't forget to set `DATABASE_URL` in `kener` service to be: `DATABASE_URL=mysql://db_user:db_password@localhost:3306/kener_db`)
mysql:
image: mariadb:11
container_name: mysql
environment:
MYSQL_USER: user
MYSQL_PASSWORD: some_super_random_secure_password # Best to define this in `.env` or via Docker Secret!!
MYSQL_DATABASE: kener_db
MYSQL_RANDOM_ROOT_PASSWORD: true
restart: unless-stopped
#mysql:
# image: mariadb:11
# container_name: mysql
# environment:
# MYSQL_USER: user
# MYSQL_PASSWORD: some_super_random_secure_password # Best to define this in `.env` or via Docker Secret!!
# MYSQL_DATABASE: kener_db
# MYSQL_RANDOM_ROOT_PASSWORD: true
# restart: unless-stopped

volumes:
data:
Expand Down
Loading