-
Notifications
You must be signed in to change notification settings - Fork 0
/
generateEnv.sh
executable file
·40 lines (35 loc) · 1.1 KB
/
generateEnv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -e
EXPOSED_HOST=cms.localhost
WORDPRESS_URL="http://${EXPOSED_HOST}:8000"
if [ ! -z "$CODESPACE_NAME" ]
then
EXPOSED_HOST="${CODESPACE_NAME}-8000.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
WORDPRESS_URL="https://${EXPOSED_HOST}"
fi
cat > .env <<EOF
# CONTAINERS DEV FILES OWNERSHIP ON MOUNTED VOLUMES
USER_ID=$(id -u)
GROUP_ID=$(id -g)
EXPOSED_HOST=${EXPOSED_HOST}
# STOREFRONT - NEXTJS
NEXT_PUBLIC_BASE_URL=http://localhost:3000/api
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="<changeit>"
STRIPE_SECRET_KEY="<changeit>"
# CMS - WORDPRESS
WORDPRESS_URL=${WORDPRESS_URL}
WORDPRESS_DB_HOST=db
WORDPRESS_DB_NAME=aixmazon
WORDPRESS_DB_USER=aixmazon_user
WORDPRESS_ADMIN_USERNAME=admin
WORDPRESS_ADMIN_PASSWORD=admin
WORDPRESS_ADMIN_EMAIL_ADDRESS=admin@example.com
WORDPRESS_DB_PASSWORD_FILE=/var/run/secrets/cms_db_password
WOOCOMMERCE_API_KEY=ck_bdd51885c94eaa1c35a8714de211a84567213489
WOOCOMMERCE_API_SECRET=cs_9e5aa761a36d7c6b321f882c0aacf99929a1b259
# DB - MARIADB
MYSQL_DATABASE=aixmazon
MYSQL_USER=aixmazon_user
MYSQL_PASSWORD_FILE=/var/run/secrets/cms_db_password
MYSQL_RANDOM_ROOT_PASSWORD=1
EOF