2020-07-10 13:48:42 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2020-07-16 06:17:45 +00:00
|
|
|
if [ ! -f docker-compose.yml ]; then
|
2020-07-10 13:48:42 +00:00
|
|
|
touch docker-compose.yml
|
|
|
|
|
fi
|
|
|
|
|
|
2020-07-21 11:24:08 +00:00
|
|
|
cat >| docker-compose.yml << EOF
|
2020-07-10 13:48:42 +00:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
nginx:
|
|
|
|
|
image: appsmith/appsmith-editor
|
|
|
|
|
env_file: ./docker.env
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
2020-07-16 06:17:45 +00:00
|
|
|
- ./data/nginx/app.conf.template:/nginx.conf.template
|
2020-07-10 13:48:42 +00:00
|
|
|
- ./data/certbot/conf:/etc/letsencrypt
|
|
|
|
|
- ./data/certbot/www:/var/www/certbot
|
2020-07-16 06:17:45 +00:00
|
|
|
command: "/bin/sh -c 'while :; do sleep 6h & wait \$\${!}; nginx -s reload; done & /start-nginx.sh'"
|
2020-07-10 13:48:42 +00:00
|
|
|
depends_on:
|
|
|
|
|
- appsmith-internal-server
|
|
|
|
|
networks:
|
|
|
|
|
- appsmith
|
|
|
|
|
|
|
|
|
|
certbot:
|
|
|
|
|
image: certbot/certbot
|
|
|
|
|
volumes:
|
|
|
|
|
- ./data/certbot/conf:/etc/letsencrypt
|
|
|
|
|
- ./data/certbot/www:/var/www/certbot
|
|
|
|
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait \$\${!}; done;'"
|
|
|
|
|
networks:
|
|
|
|
|
- appsmith
|
|
|
|
|
|
|
|
|
|
appsmith-internal-server:
|
|
|
|
|
image: appsmith/appsmith-server:latest
|
2020-07-14 09:15:08 +00:00
|
|
|
env_file:
|
|
|
|
|
- ./docker.env
|
|
|
|
|
- ./encryption.env
|
2020-07-10 13:48:42 +00:00
|
|
|
ports:
|
|
|
|
|
- "8080:8080"
|
|
|
|
|
links:
|
|
|
|
|
- mongo
|
|
|
|
|
depends_on:
|
|
|
|
|
- mongo
|
|
|
|
|
networks:
|
|
|
|
|
- appsmith
|
|
|
|
|
|
|
|
|
|
mongo:
|
|
|
|
|
image: mongo
|
|
|
|
|
ports:
|
|
|
|
|
- "27017:27017"
|
|
|
|
|
environment:
|
|
|
|
|
- MONGO_INITDB_DATABASE=appsmith
|
|
|
|
|
- MONGO_INITDB_ROOT_USERNAME=$mongo_root_user
|
|
|
|
|
- MONGO_INITDB_ROOT_PASSWORD=$mongo_root_password
|
|
|
|
|
volumes:
|
|
|
|
|
- ./data/mongo/db:/data/db
|
|
|
|
|
- ./data/mongo/init.js:/docker-entrypoint-initdb.d/init.js:ro
|
|
|
|
|
networks:
|
|
|
|
|
- appsmith
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
|
|
|
|
networks:
|
|
|
|
|
- appsmith
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
appsmith:
|
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
|
|
EOF
|