Skip to content

Commit

Permalink
Merge pull request #92 from c4dt/autogenerate_env
Browse files Browse the repository at this point in the history
Autogenerating .env
  • Loading branch information
ineiti authored Jan 25, 2024
2 parents a2a262a + 8a55e11 commit fa9c0d4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This is an example .env file with default passwords and private keys.
# Do not use this in production or with any public-facing ports!
DELA_PROXY_URL=http://172.19.44.254:8080
DATABASE_USERNAME=dvoting
DATABASE_PASSWORD=Ohw0phoa # choose any PostgreSQL password
DATABASE_HOST=db
DATABASE_PORT=5432
DB_PATH=dvoting # LMDB database path
FRONT_END_URL=http://127.0.0.1:3000 # the automated frontend tests expect this value do not change it
BACKEND_HOST=backend
BACKEND_PORT=5000
SESSION_SECRET=kaibaaF9 # choose any secret
# For public-facing services and production, this key needs to be changed!
PRIVATE_KEY=6aadf480d068ac896330b726802abd0da2a5f3824f791fe8dbd4cd555e80b809
PUBLIC_KEY=3e5fcaed4c5d79a8eccceeb087ee0a13b8f91d917ed62017a9cd28e13b228389
PROXYPORT=8080
NODEPORT=2000 # DELA node port

3 changes: 3 additions & 0 deletions scripts/run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ if [[ $(git rev-parse --show-toplevel) != $(pwd) ]]; then
exit 1;
fi

if [[ ! -f .env ]]; then
cp .env.example .env
fi

source ./.env;
export COMPOSE_FILE=${COMPOSE_FILE:-./docker-compose/docker-compose.yml};
Expand Down

0 comments on commit fa9c0d4

Please sign in to comment.