-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
59 lines (55 loc) Β· 2.13 KB
/
docker-compose.yaml
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
55
56
57
58
59
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000" # EXPOSING PORT FOR INTERNAL COMMUNICATIONS
environment:
NODE_ENV: "${NODE_ENV}"
NEXT_PUBLIC_STRIPE_WEBHOOK_CHECKOUT_URL: "${NEXT_PUBLIC_STRIPE_WEBHOOK_CHECKOUT_URL}"
MONGODB_URL: "${MONGODB_URL}"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}"
CLERK_SECRET_KEY: "${CLERK_SECRET_KEY}"
WEBHOOK_SECRET: "${WEBHOOK_SECRET}"
NEXT_PUBLIC_CLERK_SIGN_IN_URL: "${NEXT_PUBLIC_CLERK_SIGN_IN_URL}"
NEXT_PUBLIC_CLERK_SIGN_UP_URL: "${NEXT_PUBLIC_CLERK_SIGN_UP_URL}"
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: "${NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL}"
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: "${NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL}"
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME: "${NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME}"
NEXT_PUBLIC_CLOUDINARY_API_KEY: "${NEXT_PUBLIC_CLOUDINARY_API_KEY}"
NEXT_PUBLIC_CLOUDINARY_API_SECRET: "${NEXT_PUBLIC_CLOUDINARY_API_SECRET}"
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET: "${NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET}"
NEXT_PUBLIC_CLOUDINARY_BUCKET_NAME: "${NEXT_PUBLIC_CLOUDINARY_BUCKET_NAME}"
NEXT_PUBLIC_STRIPE_SECRET_KEY: "${NEXT_PUBLIC_STRIPE_SECRET_KEY}"
NEXT_PUBLIC_STRIPE_WEBHOOK_SECRET: "${NEXT_PUBLIC_STRIPE_WEBHOOK_SECRET}"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY}"
depends_on:
- mongodb
volumes:
- .:/app
command: npm start:prod # STARTING BUILD VERSION OF THIS APP
mongodb:
image: mongo:6.0
container_name: mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- mongodb_data:/data/db
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf # MOUNT THE CUSTOM NGINX CONFIGURATION
- /etc/letsencrypt:/etc/letsencrypt # MOUNT LET'S NCRYPT CERTIFICATES
ports:
- "80:80"
- "443:443"
depends_on:
- app
command: /bin/bash -c "nginx -g 'daemon off;'"
volumes:
mongodb_data: