-
Notifications
You must be signed in to change notification settings - Fork 16
/
env.sh.dist
35 lines (30 loc) · 1.35 KB
/
env.sh.dist
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
#!/bin/sh
# Example default ENV vars for local development.
# Do not modify `env.sh.dist` directly, copy it to (gitignored) `env.sh` and use that instead.
# Should be loaded into shell used to run `docker-compose up`.
# - Set all _PORT vars to port numbers not used by your system.
export GO_TEST_TIME_FACTOR="1.0" # Increase if tests fail because of slow CPU.
# Lower-case variables are either used only by docker-compose.yml or
# provide reusable values for project's upper-case variables defined below.
export example_mysql_addr_port="3306"
# Variables required to run and test project.
# Should be kept in sorted order.
# Avoid referencing one variable from another if their order may change,
# use lower-case variables defined above for such a shared values.
export EXAMPLE_ADDR_HOST="localhost"
export EXAMPLE_ADDR_PORT="8000"
export EXAMPLE_APIKEY_ADMIN="admin"
export EXAMPLE_METRICS_ADDR_PORT="9000"
export EXAMPLE_MYSQL_ADDR_HOST="127.0.0.1"
export EXAMPLE_MYSQL_ADDR_PORT="${example_mysql_addr_port}"
export EXAMPLE_MYSQL_AUTH_LOGIN="root"
export EXAMPLE_MYSQL_AUTH_PASS=""
# DO NOT MODIFY BELOW THIS LINE!
env1="$(sed -e '/^$/d' -e '/^#/d' -e 's/=.*//' env.sh.dist)"
env2="$(sed -e '/^$/d' -e '/^#/d' -e 's/=.*//' env.sh)"
if test "$env1" != "$env2"; then
echo
echo "[31mFile env.sh differ from env.sh.dist, please update and reload env.sh.[0m"
echo
return 1
fi