Skip to content

Instantly share code, notes, and snippets.

@tjerman

tjerman/.env Secret

Created December 16, 2021 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjerman/05c7aa854755c6ba5a4530d6155ab5eb to your computer and use it in GitHub Desktop.
Save tjerman/05c7aa854755c6ba5a4530d6155ab5eb to your computer and use it in GitHub Desktop.
########################################################################################################################
# docker-compose supports environment variable interpolation/substitution in compose configuration file
# (more info: https://docs.docker.com/compose/environment-variables)
########################################################################################################################
# General settings
DOMAIN=localhost:18080
VERSION=2021.9.3
########################################################################################################################
# Database connection
DB_DSN=dbuser:dbpass@tcp(db:3306)/dbname?collation=utf8mb4_general_ci
########################################################################################################################
# Server settings
# Running all-in-one and serving web applications directly from server container
HTTP_WEBAPP_ENABLED=true
# Disabled, we do not need detailed persistent logging of actions in local env
ACTIONLOG_ENABLED=false
########################################################################################################################
# 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>'
version: '3.5'
services:
server:
image: cortezaproject/corteza:${VERSION}
restart: always
env_file: [ .env ]
depends_on: [ db ]
ports: [ "127.0.0.1:18080:80" ]
db:
image: percona:8.0
restart: always
volumes:
- "dbdata:/var/lib/mysql"
environment:
MYSQL_DATABASE: dbname
MYSQL_USER: dbuser
MYSQL_PASSWORD: dbpass
# 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 }
volumes:
dbdata:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment