Fix env defaults: use Docker network hostnames + parametrize compose
This commit is contained in:
parent
18ade1e252
commit
384d4d5489
4 changed files with 47 additions and 7 deletions
12
.env.example
Normal file
12
.env.example
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# Variables read by docker-compose.yml at the project root.
|
||||||
|
# Copy to .env (chmod 600) and fill with real values.
|
||||||
|
# Generate a strong password with: openssl rand -base64 24 | tr -d '/+' | head -c 24
|
||||||
|
|
||||||
|
POSTGRES_DB=gendesign
|
||||||
|
POSTGRES_USER=gendesign
|
||||||
|
POSTGRES_PASSWORD=changeme
|
||||||
|
|
||||||
|
# For docker-compose.prod.yml only:
|
||||||
|
# YC_REGISTRY_ID=
|
||||||
|
# IMAGE_TAG=latest
|
||||||
|
# NEXT_PUBLIC_API_BASE_URL=https://your-domain.example.ru
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
DATABASE_URL=postgresql+psycopg://gendesign:gendesign@localhost:5432/gendesign
|
# Hostname-related defaults assume Docker Compose context (this is the recommended way to run).
|
||||||
REDIS_URL=redis://localhost:6379/0
|
# For native development without Docker, swap "postgres" → "localhost" and "redis" → "localhost".
|
||||||
|
|
||||||
|
DATABASE_URL=postgresql+psycopg://gendesign:gendesign@postgres:5432/gendesign
|
||||||
|
REDIS_URL=redis://redis:6379/0
|
||||||
CORS_ORIGINS=["http://localhost:3000"]
|
CORS_ORIGINS=["http://localhost:3000"]
|
||||||
ENVIRONMENT=dev
|
ENVIRONMENT=dev
|
||||||
SENTRY_DSN=
|
SENTRY_DSN=
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgis/postgis:16-3.4
|
image: postgis/postgis:16-3.4
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DB: gendesign
|
POSTGRES_DB: ${POSTGRES_DB:-gendesign}
|
||||||
POSTGRES_USER: gendesign
|
POSTGRES_USER: ${POSTGRES_USER:-gendesign}
|
||||||
POSTGRES_PASSWORD: gendesign
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-gendesign}
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "pg_isready", "-U", "gendesign"]
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-gendesign}"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
|
||||||
27
sshkey.txt
27
sshkey.txt
|
|
@ -17,4 +17,29 @@ The key's randomart image is:
|
||||||
|
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPGKuThuQMPdjxdA9FXHkUZUO+iyVbSMOxy3qFbOY7+K gendesign-deploy
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPGKuThuQMPdjxdA9FXHkUZUO+iyVbSMOxy3qFbOY7+K gendesign-deploy
|
||||||
|
|
||||||
mYsNNJf%6hpN
|
mYsNNJf%6hpN
|
||||||
|
|
||||||
|
`gendesign' 12345 ssh gendesign
|
||||||
|
|
||||||
|
for github
|
||||||
|
Generating public/private ed25519 key pair.
|
||||||
|
Your identification has been saved in /home/gendesign/.ssh/github_deploy
|
||||||
|
Your public key has been saved in /home/gendesign/.ssh/github_deploy.pub
|
||||||
|
The key fingerprint is:
|
||||||
|
SHA256:W9Ioi7A/d+LxIghIOoF4rGurbEnIHuVjDtfF1Ki+C1o gendesign-server-deploy-key
|
||||||
|
The key's randomart image is:
|
||||||
|
+--[ED25519 256]--+
|
||||||
|
| o |
|
||||||
|
| o . |
|
||||||
|
|o. + |
|
||||||
|
|+.o. . o o |
|
||||||
|
|*++ o o S o |
|
||||||
|
|B= B + o + |
|
||||||
|
|o+OEo + . |
|
||||||
|
|o=+o+.+o. |
|
||||||
|
|=+. .*o+. |
|
||||||
|
+----[SHA256]-----+
|
||||||
|
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPYYAH7vPN/b0npfH1IrhADdE+SwJsmo8gJm84VauM4m gendesign-server-deploy-key
|
||||||
|
|
||||||
|
pg pass 2J2SBPMKuS998fiwhtQqDhMI
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue