File size: 1,554 Bytes
9d4a3b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
services:
  migrate:
    build:
      context: .
      target: builder
    environment:
      LINKEDIN_SQLITE_PATH: /data/linkedin.sqlite3
    command: ["npm", "run", "db:migrate"]
    volumes:
      - linkedin-data:/data
    restart: "no"

  app:
    build: .
    depends_on:
      migrate:
        condition: service_completed_successfully
    environment:
      NODE_ENV: production
      LINKEDIN_SQLITE_PATH: /data/linkedin.sqlite3
      SESSION_SECRET: local-compose-session-secret-change-before-deploying
      EMAIL_VERIFICATION_SECRET: local-compose-email-secret-change-before-deploying
      SESSION_COOKIE_SECURE: "false"
      APP_URL: http://localhost:8080
      NEXT_PUBLIC_APP_URL: http://localhost:8080
      DEFAULT_TENANT_SLUG: northstar-systems
      EMAIL_DELIVERY_MODE: console
      MAIL_FROM: "LinkedIn <no-reply@linkedin.local>"
      STRIPE_SECRET_KEY: sk_test_replace_with_test_mode_key
      STRIPE_PREMIUM_PRICE_ID: price_replace_with_test_price
      STRIPE_WEBHOOK_SECRET: replace_with_test_webhook_secret
    ports:
      - "3000:3000"
    volumes:
      - linkedin-data:/data
    healthcheck:
      test: ["CMD-SHELL", "node -e \"fetch('http://127.0.0.1:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\""]
      interval: 15s
      timeout: 5s
      retries: 8

  nginx:
    image: nginx:1.27-alpine
    depends_on:
      app:
        condition: service_healthy
    ports:
      - "8080:80"
    volumes:
      - ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro

volumes:
  linkedin-data: