# clone the project from repo
git clone https://gitlab.com/swiftyteam/swifty.connector.git
# set up permissions
cd swifty.connector
chmod -R 777 storage bootstrap/cache
# set up config (important to specify APP_ENV=production for prod)
cp .env.example .env
nano .env
# copy default or your logo
cp public/img/logo.svg.example public/img/logo.svg
cp public/img/logo-white.svg.example public/img/logo-white.svg
# create volumes for certbot (if doesn't exists)
docker volume create certs
docker volume create certs-data
# if you need SSL, copy nginx config and
# replace DOMAIN_NAME with your domain
cp nginx.conf.with-ssl nginx.conf
sed -i 's/DOMAIN_NAME/mydomain.com/g' nginx.conf
# and request a certificate for your domain
# (replace DOMAIN_NAME with your domain)
docker run -ti --rm \
-v certs:/etc/letsencrypt \
-v certs-data:/data/letsencrypt \
--net=host \
deliverous/certbot \
certonly \
--standalone \
-d DOMAIN_NAME
# if there is no need for SSL
cp nginx.conf.without-ssl nginx.conf
# copy email templates
cp -pri resources/views/emails/examples/* resources/views/emails/customers/
# run deploy
./deploy.sh
# generate key for encrypt
docker-compose exec app php artisan key:generate
# just run
./deploy.sh
docker run -t --rm \
-v certs:/etc/letsencrypt \
-v certs-data:/data/letsencrypt \
deliverous/certbot \
renew \
--webroot --webroot-path=/data/letsencrypt