From ad261f00467c1e1fc31b181ecd031b5a6e1e5144 Mon Sep 17 00:00:00 2001 From: "mike.michel" Date: Thu, 5 Sep 2024 00:08:54 +0200 Subject: [PATCH] improve docker-compose --- apps/docs/quickstart.mdx | 24 +++++++++++++----------- docker-compose.dev.yaml | 34 ++++++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/apps/docs/quickstart.mdx b/apps/docs/quickstart.mdx index 07cec42e9..970a0ee40 100644 --- a/apps/docs/quickstart.mdx +++ b/apps/docs/quickstart.mdx @@ -48,7 +48,7 @@ git clone https://github.com/gitroomhq/gitroom Copy the `.env.example` file to `.env` and fill in the values ```bash .env -DATABASE_URL="postgres database URL" +DATABASE_URL="postgres database URL i.g. postgresql://postiz-local:postiz-local-pwd@0.0.0.0:5432/postiz-db-local" REDIS_URL="redis database URL" JWT_SECRET="random string for your JWT secret, make it long" FRONTEND_URL="By default: http://localhost:4200" @@ -73,6 +73,7 @@ CLOUDFLARE_BUCKET_URL="Cloudflare R2 Backet URL" NX_ADD_PLUGINS=false IS_GENERAL="true" # required for now ``` + @@ -80,19 +81,20 @@ IS_GENERAL="true" # required for now ```bash Terminal npm install ``` - - -```bash Terminal -docker compose -f "docker-compose.dev.yaml" up -``` - -```bash Terminal -npm run prisma-db-push -``` - +{' '} + + Using this you can skip the redis and postgres steps from above. This will + also give you pg-admin to check the database. ```bash Terminal docker compose + -f "docker-compose.dev.yaml" up ``` + + +{' '} + + ```bash Terminal npm run prisma-db-push ``` + ```bash Terminal diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index 5948c53f6..55641b1b3 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -1,26 +1,40 @@ -version: '3.9' - services: - gitroom-postgres: + postiz-postgres: image: postgres:14.5 - container_name: gitroom-postgres + container_name: postiz-postgres restart: always environment: - POSTGRES_PASSWORD: gitroom-local-pwd - POSTGRES_USER: gitroom-local - POSTGRES_DB: gitroom-db-local + POSTGRES_PASSWORD: postiz-local-pwd + POSTGRES_USER: postiz-local + POSTGRES_DB: postiz-db-local volumes: - postgres-volume:/var/lib/postgresql/data ports: - 5432:5432 - gitroom-redis: + networks: + - postiz-network + postiz-pg-admin: + image: dpage/pgadmin4 + container_name: postiz-pg-admin + restart: always + ports: + - 8081:80 + environment: + PGADMIN_DEFAULT_EMAIL: admin@admin.com + PGADMIN_DEFAULT_PASSWORD: admin + networks: + - postiz-network + postiz-redis: image: redis:7.2 - container_name: gitroom-redis + container_name: postiz-redis restart: always ports: - 6379:6379 - volumes: postgres-volume: external: false + +networks: + postiz-network: + external: false