Skip to content

Commit

Permalink
Update Devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
joern-lang-studitemps committed May 7, 2024
1 parent 2566503 commit b483d7d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "jehovakel_ex_event_store",
"dockerComposeFile": [
"../docker-compose.yml",
"docker-compose.yml"
],
"service": "devcontainer",
"workspaceFolder": "/workspace",
// "onCreateCommand": ".devcontainer/bin/onCreateCommand",
// "updateContentCommand": ".devcontainer/bin/updateContentCommand",
"onCreateCommand": ".devcontainer/bin/onCreateCommand",
"updateContentCommand": ".devcontainer/bin/updateContentCommand",
"customizations": {
"codespaces": {
"repositories": {
Expand Down
12 changes: 6 additions & 6 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ config :jehovakel_ex_event_store,

# General Repository configuration
config :jehovakel_ex_event_store, Support.JehovakelExRepo,
username: System.get_env("PG_USER") || System.get_env()["USER"],
password: System.get_env("PG_PASSWORD") || "",
username: System.get_env("PG_USER") || "postgres",
password: System.get_env("PG_PASSWORD") || "postgres",
port: System.get_env("PG_PORT") || "5432",
hostname: System.get_env("PG_HOST") || "localhost",
hostname: System.get_env("PG_HOST") || "postgres",
database: System.get_env("PG_NAME") || "jehovakel_ex_event_store_#{config_env()}",
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
migration_source: "readstore_schema_migrations"

config :eventstore, EventStore.Storage,
serializer: EventStore.TermSerializer,
username: System.get_env("PG_USER") || System.get_env()["USER"],
password: System.get_env("PG_PASSWORD") || "",
username: System.get_env("PG_USER") || "postgres",
password: System.get_env("PG_PASSWORD") || "postgres",
port: System.get_env("PG_PORT") || "5432",
hostname: System.get_env("PG_HOST") || "localhost",
hostname: System.get_env("PG_HOST") || "postgres",
database: System.get_env("PG_NAME") || "jehovakel_ex_event_store_#{config_env()}",
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")

Expand Down
12 changes: 6 additions & 6 deletions config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ config :jehovakel_ex_event_store,
# General Repository configuration
config :jehovakel_ex_event_store, Support.Repo,
adapter: Ecto.Adapters.Postgres,
username: System.get_env("PG_USER") || System.get_env()["USER"],
password: System.get_env("PG_PASSWORD") || "",
username: System.get_env("PG_USER") || "postgres",
password: System.get_env("PG_PASSWORD") || "postgres",
port: System.get_env("PG_PORT") || "5432",
hostname: System.get_env("PG_HOST") || "localhost",
hostname: System.get_env("PG_HOST") || "postgres",
database: System.get_env("PG_NAME") || "jehovakel_ex_#{config_env()}",
# Avoid collisions with eventstore `schema_migrations` relation
migration_source: "readstore_schema_migrations",
Expand All @@ -21,10 +21,10 @@ config :jehovakel_ex_event_store, Support.Repo,

config :jehovakel_ex_event_store, JehovakelEx.EventStore,
serializer: EventStore.TermSerializer,
username: System.get_env("PG_USER") || System.get_env()["USER"],
password: System.get_env("PG_PASSWORD") || "",
username: System.get_env("PG_USER") || "postgres",
password: System.get_env("PG_PASSWORD") || "postgres",
port: System.get_env("PG_PORT") || "5432",
hostname: System.get_env("PG_HOST") || "localhost",
hostname: System.get_env("PG_HOST") || "postgres",
database: System.get_env("PG_NAME") || "jehovakel_ex_#{config_env()}",
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
# erhöht die DB-Pool checkout timeouts, so dass die Tests mehr Zeit haben und durchlaufen können
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ version: '3'
services:
postgres:
image: postgres:12.9
ports:
- 5432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres

0 comments on commit b483d7d

Please sign in to comment.