# This is a sample docker-compose file that can be used to run Joplin Server # along with a PostgreSQL server. # # All environment variables are optional. If you don't set them, you will get a # warning from docker-compose, however the app should use working defaults. version: '3' services: db: image: postgres:13.1 ports: - "5432:5432" restart: unless-stopped environment: - APP_PORT=22300 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_DB=${POSTGRES_DATABASE} app: image: joplin/server:latest depends_on: - db ports: - "22300:22300" restart: unless-stopped environment: - APP_BASE_URL=${APP_BASE_URL} - DB_CLIENT=pg - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_DATABASE=${POSTGRES_DATABASE} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PORT=${POSTGRES_PORT} - POSTGRES_HOST=db