/opt/corteza
/opt/corteza/data
/opt/corteza/data/server
/opt/corteza/data/db
/opt/corteza/docker-compose.yaml
/opt/corteza/.env
version: '3.5'
services:
server:
image: cortezaproject/corteza:${VERSION}
restart: always
env_file: [ .env ]
depends_on: [ db ]
ports: ["0.0.0.0:18080:80"]
volumes: [ "./data/server:/data" ]
#environment:
# VIRTUAL_HOST helps NginX proxy route traffic for specific virtual host to
# this container
# This value is also picked up by initial boot auto-configuration procedure
# If this is changed, make sure you change settings accordingly
#VIRTUAL_HOST: ${DOMAIN}
#
# This is needed only if you are using NginX Lets-Encrypt companion
# (see docs.cortezaproject.org for details)
#LETSENCRYPT_HOST: ${DOMAIN}
db:
# PostgreSQL Database
# See https://hub.docker.com/_/postgres for details
# Support for postgres 13, 14 and 15 is available in the latest version of Corteza
image: postgres:15
restart: always
healthcheck: { test: ["CMD-SHELL", "pg_isready -U corteza"], interval: 10s, timeout: 5s, retries: 5 }
ports: ["0.0.0.0:5432:5432"]
volumes:
- "./data/db:/var/lib/postgresql/data"
environment:
# Warning: these are values that are only used on 1st start
# if you want to change it later, you need to do that
# manually inside db container
POSTGRES_USER: corteza
POSTGRES_PASSWORD: corteza
########################################################################################################################
# docker-compose supports environment variable interpolation/substitution in compose configuration file
# (more info: https://docs.docker.com/compose/environment-variables)
########################################################################################################################
# General settings
DOMAIN=101.37.252.181:18080
VERSION=2023.9
########################################################################################################################
# Database connection
DB_DSN=postgres://corteza:cortezaLihl198073,@db:5432/corteza?sslmode=disable
########################################################################################################################
# Server settings
# Serve Corteza webapps alongside API
HTTP_WEBAPP_ENABLED=true
# Send action log to container logs as well
ACTIONLOG_DEBUG=false
# Uncomment for extra debug info if something goes wrong
# LOG_LEVEL=debug
# Use nicer and colorful log instead of JSON
# LOG_DEBUG=true
########################################################################################################################
# Authentication
# Secret to use for JWT token
# Make sure you change it (>30 random characters) if
# you expose your deployment to outside traffic
# AUTH_JWT_SECRET=this-is-only-for-demo-purpose--make-sure-you-change-it-for-production
########################################################################################################################
# SMTP (mail sending) settings
# Point this to your local or external SMTP server if you want to send emails.
# In most cases, Corteza can detect that SMTP is disabled and skips over sending emails without an error
#SMTP_HOST=smtp-server.example.tld:587
#SMTP_USER=postmaster@smtp-server.example.tld
#SMTP_PASS=this-is-your-smtp-password
#SMTP_FROM='"Demo" <info@your-demo.example.tld>'
docker-compose up -d
CONTAINER ID IMAGE COMMAND CREATED ...
4352c141c1d8 cortezaproject/corteza:2023.9 "./bin/corteza-serve…" 8 hours ago ...
01a971c683a4 postgres:15 "docker-entrypoint.s…" 8 hours ago ...
version: '3.5'
services:
server:
image: cortezaproject/corteza:${VERSION}
networks:
- default
restart: always
env_file: [ .env ]
depends_on: [ db ]
volumes:
- ./data/server:/data
ports:
- 18080:80
db:
# MySQL Database
# See https://hub.docker.com/r/percona/percona-server for details
image: percona:8.0
volumes:
- ./data/db:/var/lib/mysql
networks:
- default
restart: always
environment:
MYSQL_DATABASE: czdb
MYSQL_USER: corteza
MYSQL_PASSWORD: corteza
# get the random generated password by running: docker-compose logs db | grep "GENERATED ROOT PASSWORD"
MYSQL_RANDOM_ROOT_PASSWORD: random
healthcheck: { test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"], timeout: 20s, retries: 10 }
ports:
- 3306:3306
networks:
default:
driver: bridge