-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
176 lines (158 loc) · 4.26 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: "3.8"
services:
db:
image: postgres
container_name: local_pgdb
restart: always
# ports:
# - "54320:5432"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: 1234
volumes:
- local_pgdata:/var/lib/postgresql/data
networks:
- secure_network
backend:
build:
context: ./my-medusa-backend
dockerfile: Dockerfile
image: backend:tes
container_name: medusa-server
mem_limit: 1200m
cpus: 0.7
depends_on:
- db
- meilisearch
volumes:
- node_modules:/usr/src/app/node_modules
environment:
DATABASE_URL: postgres://user:1234@db:5432/medusa-db-8z24y
REDIS_URL: redis://localhost:6379
# NODE_ENV: development
MEILISEARCH_HOST: http://meilisearch:7700
MEILISEARCH_API_KEY: masterKey
JWT_SECRET: some_jwt_secret
COOKIE_SECRET: some_cookie_secret
PORT: 9000
ports:
- "9000:9000"
networks:
- secure_network
# pgadmin:
# image: dpage/pgadmin4
# container_name: pgadmin4_container
# restart: always
# ports:
# - "5050:80"
# environment:
# PGADMIN_DEFAULT_EMAIL: mac@mail.com
# PGADMIN_DEFAULT_PASSWORD: 1234
# volumes:
# - pgadmin-data:/var/lib/pgadmin
ssh_server:
build:
context: ./ssh_server
ports:
- "2222:22"
volumes:
- ./ssh_server/authorized_keys:/home/user/.ssh/authorized_keys
command: /usr/sbin/sshd -D
networks:
- secure_network
# ssh-tunnel:
# image: alpine:latest
# command: sh -c "apk add --update openssh-client && ssh -N ${REMOTE_USER}@${REMOTE_IP} -L 0.0.0.0:54321:127.0.0.1:5432 "
# # The command above installs the SSH client, creates an SSH tunnel, and keeps the tunnel active.
# # Replace "user" with your SSH username, and "your_remote_server_ip" with the server's IP address.
# environment:
# - REMOTE_IP=${REMOTE_IP}
# - REMOTE_USER=${REMOTE_USER}
# depends_on:
# - db
# networks:
# - secure_network
# pgbackups:
# image: prodrigestivill/postgres-backup-local
# # container_name: pg_backup
# restart: always
# # user: postgres:postgres # Optional: see below
# volumes:
# - ./pgbackups:/backups
# links:
# - db
# depends_on:
# - db
# ports:
# - "5052:8080"
# environment:
# - POSTGRES_HOST=db
# - POSTGRES_DB=test
# - POSTGRES_USER=user
# - POSTGRES_PASSWORD=1234
# # - POSTGRES_PASSWORD_FILE=/run/secrets/db_password <-- alternative for POSTGRES_PASSWORD (to use with docker secrets)
# - POSTGRES_EXTRA_OPTS=-Z6 --schema=public --blobs
# - SCHEDULE=@every 0h01m00s
# # @daily
# - BACKUP_KEEP_DAYS=7
# - BACKUP_KEEP_WEEKS=4
# - BACKUP_KEEP_MONTHS=6
# - HEALTHCHECK_PORT=8080
# networks:
# - secure_network
meilisearch:
container_name: meilisearch
image: getmeili/meilisearch:v0.25.2
environment:
- http_proxy
- https_proxy
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY:-masterKey}
- MEILI_NO_ANALYTICS=${MEILI_NO_ANALYTICS:-true}
- MEILI_ENV=${MEILI_ENV:-development}
- MEILI_LOG_LEVEL
- MEILI_DB_PATH=${MEILI_DB_PATH:-/data.ms}
ports:
- ${MEILI_PORT:-7700}:7700
networks:
- secure_network
volumes:
- ./data.ms:/data.ms
restart: unless-stopped
#####################
### Nginx Proxy
#####################
proxy:
restart: unless-stopped
image: nginx
ports:
- 80:${NGINX_PORT}
- 443:443
# - 443:443
depends_on:
- backend
volumes:
- ./nginx/conf/:/etc/nginx/conf.d/:rw
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
networks:
- secure_network
# node_network:
# aliases:
# - localhost
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt:rw
- ./certbot/www:/var/www/certbot:rw
command: certonly --webroot -w /var/www/certbot --force-renewal --email junkielabs.dev@gmail.com -d shoptest.junkielabs.in --agree-tos
networks:
secure_network:
driver: bridge
# meilisearch:
# driver: bridge
volumes:
local_pgdata:
pgadmin-data:
pgbackups:
node_modules: