-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
138 lines (130 loc) · 3.38 KB
/
docker-compose.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# generating ssl certs
# sudo openssl dhparam -out dhparam-2048.pem 2048
# docker-compose up --force-recreate --no-deps certbot, after adding A records to point to the correct ip address
version: "3.7"
services:
main:
image: "node:14.15.1-alpine3.12"
container_name: main
build:
context: .
dockerfile: Dockerfile.prod
# target: production
user: "root"
working_dir: /usr/src/app
environment:
- NODE_ENV=production
- VERSION=1.0
# volumes are only required for live reloading and binding local directories
volumes:
- /usr/src/app
- /usr/app/node_modules
ports:
- "3000:3000"
tty: true
command: "yarn start"
env_file:
- env/production.env
networks:
- webnet
restart: always
logging:
driver: awslogs
options:
awslogs-region: "ap-south-1"
awslogs-group: "Molecule"
awslogs-stream: "main"
# minio:
# image: 'bitnami/minio:latest'
# ports:
# - '9000:9000'
# environment:
# - MINIO_ACCESS_KEY=shanur
# - MINIO_SECRET_KEY=shanurrahman123
# networks:
# - webnet
# mongodb:
# image: 'docker.io/bitnami/mongodb:4.4-debian-10'
# ports:
# - "27017:27017"
# volumes:
# - 'mongodb_data:/bitnami/mongodb'
# networks:
# - webnet
redis:
image: "bitnami/redis:latest"
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_PASSWORD=password123
- REDIS_USER=shanur
command: /opt/bitnami/scripts/redis/run.sh --maxmemory 100mb
ports:
- "6379:6379"
networks:
- webnet
logging:
driver: awslogs
options:
awslogs-region: "ap-south-1"
awslogs-group: "Molecule"
awslogs-stream: "redis"
webserver:
restart: unless-stopped
image: staticfloat/nginx-certbot
ports:
- 80:80/tcp
- 443:443/tcp
environment:
CERTBOT_EMAIL: shanur.cse.nitap@gmail.com
# variable names are space-separated
ENVSUBST_VARS: FQDN
FQDN: moleculesystem.com
volumes:
- ./conf.d:/etc/nginx/user.conf.d:ro
- letsencrypt:/etc/letsencrypt
- /home/ec2-user/leon:/usr/share/nginx/html
depends_on:
- main
networks:
- webnet
logging:
driver: awslogs
options:
awslogs-region: "ap-south-1"
awslogs-group: "Molecule"
awslogs-stream: "webserver"
worker:
image: "node:14.15.1-alpine3.12"
container_name: worker
build:
context: "../molecule_bull_microservice"
dockerfile: Dockerfile.prod
# target: production
user: "node"
working_dir: /usr/src/app
environment:
- NODE_ENV=production
- VERSION=1.0
tty: true
command: "yarn start:prod"
env_file:
- "../molecule_bull_microservice/.env"
networks:
- webnet
ports:
- 9999:3333
restart: always
logging:
driver: awslogs
options:
awslogs-region: "ap-south-1"
awslogs-group: "Molecule"
awslogs-stream: "worker"
networks:
webnet:
volumes:
letsencrypt:
pgdata:
mongodb_data:
driver: local
# I have worked on both frontend and backend technologies extensively, including both SQL and NoSQL databases. I wrote a complete mobile CRM solution from scratch using angular ionic, MongoDB, Redis and Bull Queue, and Nginx. I would be willing to show you that in case my profile is shortlisted.