Skip to content

Commit ae3a34f

Browse files
committed
Create .env.sample file
1 parent 44b5ed4 commit ae3a34f

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.env.sample

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POSTGRES_USER: timescaledb
2+
POSTGRES_PASSWORD: postgrespassword

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ services:
3333
POSTGRES_USER: warpSQLUser
3434
POSTGRES_PASSWORD: warpSQLPass
3535
```
36+
# Environment Variables
37+
38+
Ensure that you have a `.env.sample` file same directory as the `docker-compose.yml` file.
39+
Open the `.env.sample` file in a text editor.
40+
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:
41+
42+
```
43+
POSTGRES_USER: timescaledb
44+
POSTGRES_PASSWORD: postgrespassword
45+
```
46+
Before running the project, create a new file named `.env` in the same directory as the `docker-compose.yml` file.
47+
Open the `.env` file and provide the actual values for the environment variables, specific to your setup. For example:
48+
`POSTGRES_USER=myuser`
49+
`POSTGRES_PASSWORD=mypassword`
50+
51+
Replace myuser and mypassword with the actual values you want to use.
52+
Save the `.gitignore` file. Ensure that this file is not committed to version control to protect your sensitive information.
3653

3754
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).
3855

docker-compose.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ services:
99
volumes:
1010
- ./pgdata:/var/lib/postgresql/data
1111
environment:
12-
POSTGRES_USER: timescaledb
13-
POSTGRES_PASSWORD: postgrespassword
12+
POSTGRES_USER: ${POSTGRES_USER}
13+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
1414

1515
graphql-engine:
1616
image: hasura/graphql-engine:latest
@@ -33,3 +33,13 @@ services:
3333
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
3434
HASURA_GRAPHQL_MIGRATIONS_DISABLE_TRANSACTION: "true"
3535
HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
36+
37+
pgwatch2:
38+
image: cybertec/pgwatch2-postgres:latest
39+
ports:
40+
- "3000:3000"
41+
environment:
42+
PW2_ADHOC_CONN_STR: "postgresql://timescaledb:postgrespassword@timescaledb:5432/postgres?sslmode=disable"
43+
depends_on:
44+
- "timescaledb"
45+
restart: always

0 commit comments

Comments
 (0)