mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(docker-compose): issue with volumes, issue with database connection
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
version: '3.9'
|
version: "3.9"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
teable:
|
teable:
|
||||||
@@ -7,7 +7,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${TEABLE_PORT}
|
- ${TEABLE_PORT}
|
||||||
volumes:
|
volumes:
|
||||||
- teable-data:/app/.assets:rw
|
- teable-data:/app/.assets
|
||||||
# you may use a bind-mounted host directory instead,
|
# you may use a bind-mounted host directory instead,
|
||||||
# so that it is harder to accidentally remove the volume and lose all your data!
|
# so that it is harder to accidentally remove the volume and lose all your data!
|
||||||
# - ./docker/teable/data:/app/.assets:rw
|
# - ./docker/teable/data:/app/.assets:rw
|
||||||
@@ -39,9 +39,9 @@ services:
|
|||||||
image: postgres:15.4
|
image: postgres:15.4
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '42345:5432'
|
- "${TEABLE_DB_PORT}:${POSTGRES_PORT}"
|
||||||
volumes:
|
volumes:
|
||||||
- teable-db:/var/lib/postgresql/data:rw
|
- teable-db:/var/lib/postgresql/data
|
||||||
# you may use a bind-mounted host directory instead,
|
# you may use a bind-mounted host directory instead,
|
||||||
# so that it is harder to accidentally remove the volume and lose all your data!
|
# so that it is harder to accidentally remove the volume and lose all your data!
|
||||||
# - ./docker/db/data:/var/lib/postgresql/data:rw
|
# - ./docker/db/data:/var/lib/postgresql/data:rw
|
||||||
@@ -54,7 +54,11 @@ services:
|
|||||||
- dokploy-network
|
- dokploy-network
|
||||||
- teable-standalone
|
- teable-standalone
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
|
test:
|
||||||
|
[
|
||||||
|
"CMD-SHELL",
|
||||||
|
"sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'",
|
||||||
|
]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export function generate(schema: Schema): Template {
|
|||||||
const envs = [
|
const envs = [
|
||||||
`TEABLE_HOST=${randomDomain}`,
|
`TEABLE_HOST=${randomDomain}`,
|
||||||
"TEABLE_PORT=3000",
|
"TEABLE_PORT=3000",
|
||||||
|
"TEABLE_DB_PORT=42345",
|
||||||
`HASH=${mainServiceHash}`,
|
`HASH=${mainServiceHash}`,
|
||||||
"TIMEZONE=UTC",
|
"TIMEZONE=UTC",
|
||||||
"# Postgres",
|
"# Postgres",
|
||||||
@@ -22,9 +23,9 @@ export function generate(schema: Schema): Template {
|
|||||||
"POSTGRES_USER=teable",
|
"POSTGRES_USER=teable",
|
||||||
`POSTGRES_PASSWORD=${password}`,
|
`POSTGRES_PASSWORD=${password}`,
|
||||||
"# App",
|
"# App",
|
||||||
"PUBLIC_ORIGIN=https://${TAEBLE_HOST}",
|
"PUBLIC_ORIGIN=https://${TEABLE_HOST}",
|
||||||
"PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}",
|
"PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}",
|
||||||
"PUBLIC_DATABASE_PROXY=127.0.0.1:42345",
|
"PUBLIC_DATABASE_PROXY=${TEABLE_HOST}:${TEABLE_DB_PORT}",
|
||||||
"# Need to support sending emails to enable the following configurations",
|
"# Need to support sending emails to enable the following configurations",
|
||||||
"# You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly.",
|
"# You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly.",
|
||||||
"#BACKEND_MAIL_HOST=smtp.teable.io",
|
"#BACKEND_MAIL_HOST=smtp.teable.io",
|
||||||
|
|||||||
Reference in New Issue
Block a user