Skip to content

Latest commit

 

History

History
66 lines (58 loc) · 2.53 KB

LOCAL_DEVELOPMENT_HOWTO.md

File metadata and controls

66 lines (58 loc) · 2.53 KB

Run Local Dev Server

  1. Create .env file with following properties
GITHUB_OAUTH_TOKEN="<GITHUB TOKEN FROM YOUR GITHUB ACCOUNT>"

SS_DB_HOST=db_model
SS_DATABASE=model
SS_DB_USERNAME=root
SS_DB_PASSWORD=1qaz2wsx

REDIS_HOST=redis
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=1qaz2wsx!
REDIS_DATABASES=16
  1. Create a _ss_environment.php file with follwing properties
<?php
/* What kind of environment is this: development, test, or live (ie, production)? */
define('SS_ENVIRONMENT_TYPE', 'dev');

/* Database connection */
define('SS_DATABASE_SERVER', 'db_model');
define('SS_DATABASE_USERNAME', 'root');
define('SS_DATABASE_PASSWORD', '1qaz2wsx');
define('SS_DATABASE_CLASS','CustomMySQLDatabase');
/* Global variables */
$database = 'model';
$email_from = '<YOUR EMAIL>';
$email_log = '<YOUR EMAIL>';
define('SMTPMAILER_SMTP_SERVER_ADDRESS', 'smtp.sendgrid.net'); # SMTP server address
define('SMTPMAILER_DO_AUTHENTICATE', true); # Turn on SMTP server authentication. Set to false for an anonymous connection
define('SMTPMAILER_USERNAME', ''); # SMTP server username, if SMTPAUTH == true
define('SMTPMAILER_PASSWORD', ''); # SMTP server password, if SMTPAUTH == true
define('SENDGRID_API_KEY', '<SENDGRID API KEY>');
  1. Drop here docker-compose/mysql/model the database dump *.sql file
  2. Install docker and docker compose see https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04 and https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04
  3. Run script ./start_local_server.sh (http://localhost:9000/)
  4. In order to use CMS admin locally without IDP integration do the following (https://localhost:9000/admin)[https://localhost:9000/admin]
    1. run this SQL command at DB
      1. mysql -u root -h 127.0.0.1 -P 32010 --password=1qaz2wsx model
      2. UPDATE Member SET Password = '1qaz2wsx', PasswordEncryption='none';
    2. set
      define('OPENSTACKID_ENABLED',false);
      at _ss_environment.php

Useful Commands

check containers health status

docker inspect --format "{{json .State.Health }}" www-openstack-model-db-local | jq '.