mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-15 07:54:18 +02:00
Split prod and public builds
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
container_name: feishin_db
|
||||||
|
image: postgres:13
|
||||||
|
volumes:
|
||||||
|
- ${DATABASE_PERSIST_PATH}:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=${DATABASE_USERNAME}
|
||||||
|
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
|
||||||
|
- POSTGRES_DB=${DATABASE_NAME}
|
||||||
|
ports:
|
||||||
|
- '${DATABASE_PORT}:5432'
|
||||||
|
restart: unless-stopped
|
||||||
|
server:
|
||||||
|
container_name: feishin
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: feishin
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
environment:
|
||||||
|
- APP_BASE_URL=${APP_BASE_URL}
|
||||||
|
- DATABASE_URL=postgresql://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@db/${DATABASE_NAME}?schema=public&connection_limit=14&pool_timeout=20
|
||||||
|
- DATABASE_PORT=${DATABASE_PORT}
|
||||||
|
- TOKEN_SECRET=${TOKEN_SECRET}
|
||||||
|
- TOKEN_EXPIRATION=${TOKEN_EXPIRATION}
|
||||||
|
- TOKEN_REFRESH_EXPIRATION=${TOKEN_REFRESH_EXPIRATION}
|
||||||
|
ports:
|
||||||
|
- '8643:9321'
|
||||||
|
restart: unless-stopped
|
||||||
+1
-4
@@ -14,10 +14,7 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
server:
|
server:
|
||||||
container_name: feishin
|
container_name: feishin
|
||||||
build:
|
image: jeffvictorli/feishin:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
image: feishin
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
./wait-for-it.sh db:$1 --timeout=20 --strict -- echo "db is up"
|
||||||
|
|
||||||
npx prisma migrate deploy
|
npx prisma migrate deploy
|
||||||
npx ts-node prisma/seed.ts
|
npx ts-node prisma/seed.ts
|
||||||
pm2-runtime server.js
|
pm2-runtime server.js
|
||||||
|
|||||||
Reference in New Issue
Block a user