feat (Worker): add a worker to check and adjust the TikTok graph
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
@@ -7,10 +5,10 @@ services:
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: wyview
|
||||
POSTGRES_PASSWORD: wyview_password
|
||||
POSTGRES_PASSWORD: wyview
|
||||
POSTGRES_DB: wyview
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "5433:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
@@ -24,26 +22,45 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
DATABASE_URL: postgresql://wyview:wyview_password@postgres:5432/wyview
|
||||
DATABASE_URL: postgresql://wyview:wyview@postgres:5432/wyview
|
||||
image: marouette/wyview:latest
|
||||
container_name: wyview-app
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- AUTH_URL=${AUTH_URL}
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- NEXTAUTH_URL=${NEXTAUTH_URL}
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
||||
- AUTH_SECRET=${AUTH_SECRET}
|
||||
- TIKTOK_CLIENT_KEY=${TIKTOK_CLIENT_KEY}
|
||||
- TIKTOK_CLIENT_SECRET=${TIKTOK_CLIENT_SECRET}
|
||||
- TIKTOK_REDIRECT_URI_PROD=${TIKTOK_REDIRECT_URI_PROD}
|
||||
- TIKTOK_REDIRECT_URI_DEV=${TIKTOK_REDIRECT_URI_DEV}
|
||||
- DATABASE_URL=postgresql://wyview:wyview@postgres:5432/wyview
|
||||
- AUTH_URL=${AUTH_URL}
|
||||
- NEXTAUTH_URL=${NEXTAUTH_URL}
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
||||
- AUTH_SECRET=${AUTH_SECRET}
|
||||
- TIKTOK_CLIENT_KEY=${TIKTOK_CLIENT_KEY}
|
||||
- TIKTOK_CLIENT_SECRET=${TIKTOK_CLIENT_SECRET}
|
||||
- TIKTOK_REDIRECT_URI_PROD=${TIKTOK_REDIRECT_URI_PROD}
|
||||
- TIKTOK_REDIRECT_URI_DEV=${TIKTOK_REDIRECT_URI_DEV}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command: sh -c "npx prisma migrate deploy && npm start"
|
||||
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: worker/Dockerfile
|
||||
image: marouette/wyview-worker:latest
|
||||
container_name: wyview-worker
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://wyview:wyview@postgres:5432/wyview
|
||||
- TIKTOK_CLIENT_KEY=${TIKTOK_CLIENT_KEY}
|
||||
- TIKTOK_CLIENT_SECRET=${TIKTOK_CLIENT_SECRET}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
app:
|
||||
condition: service_started
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user