mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-25 17:58:27 +00:00
Fix: docker deployment
This commit is contained in:
parent
4882f227d2
commit
4494dcafab
@ -1,7 +1,7 @@
|
|||||||
VERSION=0.1.14
|
VERSION=0.1.14
|
||||||
|
|
||||||
# Nest run in docker, change host to database container name
|
# Nest run in docker, change host to database container name
|
||||||
DB_HOST=localhost
|
DB_HOST=postgres
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
|
|
||||||
# POSTGRES
|
# POSTGRES
|
||||||
@ -10,7 +10,7 @@ POSTGRES_PASSWORD=docker
|
|||||||
POSTGRES_DB=core
|
POSTGRES_DB=core
|
||||||
|
|
||||||
LOGIN_ORIGIN=http://localhost:3033
|
LOGIN_ORIGIN=http://localhost:3033
|
||||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?schema=core
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${POSTGRES_DB}?schema=core
|
||||||
|
|
||||||
# This sets the URL used for direct connections to the database and should only be needed in limited circumstances
|
# This sets the URL used for direct connections to the database and should only be needed in limited circumstances
|
||||||
# See: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#fields:~:text=the%20shadow%20database.-,directUrl,-No
|
# See: https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#fields:~:text=the%20shadow%20database.-,directUrl,-No
|
||||||
|
|||||||
@ -29,11 +29,10 @@ services:
|
|||||||
- TRIGGER_PROJECT_ID=${TRIGGER_PROJECT_ID}
|
- TRIGGER_PROJECT_ID=${TRIGGER_PROJECT_ID}
|
||||||
- TRIGGER_SECRET_KEY=${TRIGGER_SECRET_KEY}
|
- TRIGGER_SECRET_KEY=${TRIGGER_SECRET_KEY}
|
||||||
- TRIGGER_API_URL=${TRIGGER_API_URL}
|
- TRIGGER_API_URL=${TRIGGER_API_URL}
|
||||||
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
ports:
|
ports:
|
||||||
- "3033:3000"
|
- "3033:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
init:
|
|
||||||
condition: service_started
|
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
@ -45,7 +44,7 @@ services:
|
|||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
container_name: core-postgres
|
container_name: core-postgres
|
||||||
image: redplanethq/postgres:0.1.0
|
image: tegonhq/tegon-postgres:0.1.0-alpha
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=${POSTGRES_USER}
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
@ -57,7 +56,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- core
|
- core
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER"]
|
test: ["CMD-SHELL", "pg_isready"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -99,6 +98,7 @@ services:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
core:
|
core:
|
||||||
|
name: core-network
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@ -32,7 +32,7 @@ POSTGRES_USER=docker
|
|||||||
POSTGRES_PASSWORD=docker
|
POSTGRES_PASSWORD=docker
|
||||||
TRIGGER_DB=trigger
|
TRIGGER_DB=trigger
|
||||||
|
|
||||||
DB_HOST=host.docker.internal
|
DB_HOST=postgres
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
|
|
||||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${TRIGGER_DB}?schema=public&sslmode=disable
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${TRIGGER_DB}?schema=public&sslmode=disable
|
||||||
|
|||||||
@ -21,6 +21,7 @@ services:
|
|||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
networks:
|
networks:
|
||||||
- webapp
|
- webapp
|
||||||
|
- core-network
|
||||||
|
|
||||||
webapp:
|
webapp:
|
||||||
container_name: trigger-webapp
|
container_name: trigger-webapp
|
||||||
@ -107,6 +108,7 @@ services:
|
|||||||
logging: *logging-config
|
logging: *logging-config
|
||||||
networks:
|
networks:
|
||||||
- webapp
|
- webapp
|
||||||
|
- core-network
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: ${ELECTRIC_DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/main?schema=public&sslmode=disable}
|
DATABASE_URL: ${ELECTRIC_DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/main?schema=public&sslmode=disable}
|
||||||
ELECTRIC_INSECURE: true
|
ELECTRIC_INSECURE: true
|
||||||
@ -167,6 +169,7 @@ services:
|
|||||||
- supervisor
|
- supervisor
|
||||||
- docker-proxy
|
- docker-proxy
|
||||||
- webapp
|
- webapp
|
||||||
|
- core-network
|
||||||
volumes:
|
volumes:
|
||||||
- shared:/home/node/shared
|
- shared:/home/node/shared
|
||||||
# Only needed for bootstrap
|
# Only needed for bootstrap
|
||||||
@ -241,3 +244,5 @@ networks:
|
|||||||
name: supervisor
|
name: supervisor
|
||||||
webapp:
|
webapp:
|
||||||
name: webapp
|
name: webapp
|
||||||
|
core-network:
|
||||||
|
external: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user