Skip to content

Commit

Permalink
Create .env.sample file
Browse files Browse the repository at this point in the history
  • Loading branch information
AtulRajput01 committed Jun 21, 2023
1 parent 44b5ed4 commit 5803e38
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
POSTGRES_USER: timescaledb
POSTGRES_PASSWORD: postgrespassword
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
*/.build_*

data

# Ignore .env file
.env
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ services:
POSTGRES_USER: warpSQLUser
POSTGRES_PASSWORD: warpSQLPass
```
# Environment Variables

Ensure that you have a `.env.sample` file same directory as the `docker-compose.yml` file.
Open the `.env.sample` file in a text editor.
Provide placeholders for the required environment variables in the `.env.sample` file. Do not include any actual sensitive information in this file. Here's an example of how the `.env.sample` file should look:

```
POSTGRES_USER: timescaledb
POSTGRES_PASSWORD: postgrespassword
```
Before running the project, create a new file named `.env` in the same directory as the `docker-compose.yml` file.
Open the `.env` file and provide the actual values for the environment variables, specific to your setup. For example:
`POSTGRES_USER=myuser`
`POSTGRES_PASSWORD=mypassword`

Replace myuser and mypassword with the actual values you want to use.

WarpSQL is a powerful solution that provides opinionated extensions to Postgres, conveniently packaged as a single Docker deployment. It eliminates the need to install multiple separate databases by offering a comprehensive set of features in one place (although not everything, as some features might not be included).

Expand Down
14 changes: 12 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ services:
volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: timescaledb
POSTGRES_PASSWORD: postgrespassword
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}

graphql-engine:
image: hasura/graphql-engine:latest
Expand All @@ -33,3 +33,13 @@ services:
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_MIGRATIONS_DISABLE_TRANSACTION: "true"
HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets

pgwatch2:
image: cybertec/pgwatch2-postgres:latest
ports:
- "3000:3000"
environment:
PW2_ADHOC_CONN_STR: "postgresql://timescaledb:postgrespassword@timescaledb:5432/postgres?sslmode=disable"
depends_on:
- "timescaledb"
restart: always

0 comments on commit 5803e38

Please sign in to comment.