ToolJet/server/scripts/digitalocean-postbuild.sh
Akshay 94efa97270
Update digital ocean setup (#3644)
* add placeholder values for digital ocean secrets

* revise dockerfile with security updates

* update postbuild script to use transpiled code

* add cloud-init dependency

* move cloud-init to digitalocean postbuild script

* update digitalocean postbuild script
2022-07-19 22:07:54 +05:30

16 lines
452 B
Bash
Executable file

#!/bin/sh
echo $CA_CERT > ca-certificate.pem
# Dependency for digital ocean
apt-get install -y cloud-init
# FIXME: Trying to connect to digital ocean managed db fails even with adding
# NODE_EXTRA_CA_CERTS and therefore removing sslmode from database url
export DATABASE_URL=${DATABASE_URL%"?sslmode=require"}
(
export NODE_EXTRA_CA_CERTS="$(pwd)/ca-certificate.pem"; \
npm run db:migrate:prod && \
npm run db:seed && \
npm run start:prod
)