Manage my damn life
First
cd /path/to/files
Pull the repository, or download latest release from Github.
git clone https://github.com/intri-in/manage-my-damn-life-nextjs.git
Copy sample compose file.
cp docker-compose.yml.sample docker-compose.yml
You can make changes to docker compose file using the Configuration guide as a help. If you're just running locally, no configuration is required.
networks:
app-tier:
driver: bridge
services:
app:
image: node:18-alpine
command: sh -c "npm install && npm run build && npm run start"
ports:
- 3000:3000
working_dir: /app
volumes:
- /path/to/files/manage-my-damn-life-nextjs/:/app
depends_on:
- db
networks:
- app-tier
environment:
NEXT_PUBLIC_BASE_URL: "http://192.168.1.103:3000/"
NEXT_PUBLIC_API_URL: "http://192.168.1.103:3000/api/"
NEXT_PUBLIC_DEBUG_MODE: "true"
DB_HOST: db # don't change
DB_USER: "root" # don't change
DB_PASS: "PaSsWoRd" # change and match
DB_NAME: db_mmdl # match
DB_CHARSET: "utf8mb4"
DB_COLLATE: "utf8mb4_0900_ai_ci"
AES_PASSWORD : samplepassword
SMTP_HOST : smtp.host
SMTP_USERNAME : test@example.com
SMTP_PASSWORD : smtp_password
SMTP_FROMEMAIL : test@example.com
SMTP_PORT : 25
SMTP_USESECURE : "false"
# User Config
NEXT_PUBLIC_DISABLE_USER_REGISTRATION: "false"
# After this value, old ssid will be deleted.
MAX_CONCURRENT_LOGINS_ALLOWED: 5
# Maxium length of OTP validity, in seconds.
MAX_OTP_VALIDITY: 1800
# Maximum length of a login session in seconds.
MAX_SESSION_LENGTH: 2592000
# Enforce max length of session.
ENFORCE_SESSION_TIMEOUT: "true"
#Max number of recursions for finding subtasks. Included so the recursive function doesn't go haywire.
#If subtasks are not being rendered properly, try increasing the value.
NEXT_PUBLIC_SUBTASK_RECURSION_CONTROL_VAR: 100
# Whether user is running install from a docker image.
DOCKER_INSTALL: "true"
## Test Mode
NEXT_PUBLIC_TEST_MODE: "false"
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
ports:
- "3306:3306"
networks:
- app-tier
environment:
MYSQL_DATABASE: db_mmdl # match
MYSQL_ALLOW_EMPTY_PASSWORD: ok
MYSQL_ROOT_PASSWORD: PaSsWoRd # change and match
MYSQL_ROOT_HOST: '%'
DB_USER: root
DB_PASSWORD: [same as MYSQL_ROOT_PASSWORD]
DB_HOST: db
DB_NAME: [same as MYSQL_DATABASE]
docker-compose up -d
Docker compose will start two containers : one with MMDL, and one with MySQL. MMDL should be now up and running.
Open your browser and go to http://localhost:3000/install
to start the installation process.
No Comments