Compare commits

...

97 Commits

Author SHA1 Message Date
Colin Griffin
0910dd0349 add script changes and docker-compose configuration for local development 2022-01-12 12:48:15 -05:00
Colin Griffin
c173699cab Merge pull request #67 from searsaw/patch-1
Add build args for Next.js build
2022-01-10 17:01:55 -05:00
actions-user
ec9868db91 Auto updated submodule references 2022-01-09 04:21:09 +00:00
actions-user
125afe46ba Auto updated submodule references 2022-01-08 04:21:04 +00:00
Alex Sears
ccc90a33b0 Add new env vars to docker compose file 2022-01-07 10:23:30 -05:00
actions-user
e29dbf8a42 Auto updated submodule references 2022-01-07 04:21:20 +00:00
Alex Sears
72ac9fcd19 Add build args for Next.js build 2022-01-06 17:58:19 -05:00
actions-user
35f97547ec Auto updated submodule references 2022-01-05 04:20:59 +00:00
actions-user
11bbbafd40 Auto updated submodule references 2022-01-04 14:56:23 +00:00
Colin Griffin
b52019ea2a add trigger docker build from nightly workflow and manually 2022-01-04 09:49:00 -05:00
actions-user
bfa16e213c Auto updated submodule references 2022-01-04 04:21:06 +00:00
actions-user
3d85942161 Auto updated submodule references 2021-12-31 04:20:54 +00:00
actions-user
ad752157f4 Auto updated submodule references 2021-12-30 04:20:58 +00:00
actions-user
509bfe363d Auto updated submodule references 2021-12-29 04:20:53 +00:00
actions-user
5e45e4ee83 Auto updated submodule references 2021-12-28 04:20:50 +00:00
actions-user
de336cd463 Auto updated submodule references 2021-12-23 04:21:17 +00:00
actions-user
cbad3d582c Auto updated submodule references 2021-12-22 04:21:05 +00:00
actions-user
35bc947bf1 Auto updated submodule references 2021-12-21 04:21:12 +00:00
actions-user
b29028ada4 Auto updated submodule references 2021-12-20 04:21:22 +00:00
actions-user
aec76dd7aa Auto updated submodule references 2021-12-19 04:20:37 +00:00
actions-user
08fa56dd62 Auto updated submodule references 2021-12-18 04:20:23 +00:00
Peer Richelsen
5c28cd960c Merge pull request #58 from calendso/feature/actions
Update github workflows to push to development image to dockerhub
2021-12-17 17:35:26 +00:00
Colin Griffin
03a6d0af3a trigger on branch main only 2021-12-17 12:33:49 -05:00
Colin Griffin
d99a625c6a add dockerhub location 2021-12-17 12:32:13 -05:00
Colin Griffin
b571d097b6 update readme with production remarks 2021-12-17 12:30:44 -05:00
Colin Griffin
bc9ef1619e update image paths 2021-12-17 12:14:46 -05:00
Colin Griffin
329d7deb4c update registry name 2021-12-17 12:13:34 -05:00
Colin Griffin
b7116f9e08 Merge branch 'main' of https://www.github.com/calendso/docker into feature/actions 2021-12-17 11:26:37 -05:00
actions-user
d94029e970 Auto updated submodule references 2021-12-17 16:23:37 +00:00
Colin Griffin
a3dabf3748 specify submodules: true 2021-12-17 10:50:16 -05:00
Colin Griffin
303d8cdd45 commit initial docker build/push workflow 2021-12-17 10:46:58 -05:00
actions-user
f9ac27ae30 Auto updated submodule references 2021-12-17 04:20:30 +00:00
actions-user
17ff19109d Auto updated submodule references 2021-12-16 04:20:19 +00:00
Peer Richelsen
e94b7ff350 Merge pull request #57 from flemming-petersen/Use-internel-docker-network
Make use of internal docker networks
2021-12-15 15:22:54 +00:00
Flemming Petersen
6c7ebb345a Make use of internal docker networks unifi database name 2021-12-15 16:01:30 +01:00
actions-user
50f472c7e5 Auto updated submodule references 2021-12-15 04:20:21 +00:00
actions-user
d139eeaf1e Auto updated submodule references 2021-12-14 04:20:21 +00:00
actions-user
0513d78987 Auto updated submodule references 2021-12-12 04:20:17 +00:00
actions-user
d6b7d7eced Auto updated submodule references 2021-12-11 04:19:55 +00:00
actions-user
199ab6ab81 Auto updated submodule references 2021-12-10 04:20:22 +00:00
actions-user
0f0ff3772a Auto updated submodule references 2021-12-09 04:20:32 +00:00
actions-user
19188a4534 Auto updated submodule references 2021-12-08 04:20:21 +00:00
actions-user
c323e84fa3 Auto updated submodule references 2021-12-07 04:20:55 +00:00
actions-user
43ab0be3ed Auto updated submodule references 2021-12-04 04:20:31 +00:00
actions-user
3d89147323 Auto updated submodule references 2021-12-03 04:20:19 +00:00
actions-user
baac183b8c Auto updated submodule references 2021-12-02 04:20:03 +00:00
actions-user
fdda698a93 Auto updated submodule references 2021-12-01 04:20:36 +00:00
actions-user
21534b2087 Auto updated submodule references 2021-11-30 04:16:43 +00:00
actions-user
859324820e Auto updated submodule references 2021-11-29 04:20:26 +00:00
actions-user
e058f5f136 Auto updated submodule references 2021-11-27 04:19:49 +00:00
actions-user
08c6b6ac9b Auto updated submodule references 2021-11-26 04:20:07 +00:00
actions-user
2204d4ec00 Auto updated submodule references 2021-11-25 04:20:09 +00:00
Colin Griffin
36a0dcad9e Merge pull request #52 from calendso/ssl-docs
Add remark about SSL termination
2021-11-24 12:02:13 -05:00
Colin Griffin
67663d0c5e Merge pull request #51 from krumIO/docker-build-fixes
Update dockerfile and env variables
2021-11-24 12:01:48 -05:00
actions-user
3367b01764 Auto updated submodule references 2021-11-23 04:19:56 +00:00
Colin Griffin
793eba4a5f add remarks about optional studio service 2021-11-22 15:22:04 -05:00
Colin Griffin
39acc564b3 update NEXTAUTH_URL to NEXT_PUBLIC_APP_URL to match calendso sample 2021-11-22 15:13:17 -05:00
Colin Griffin
930f0cf56a add remark about jwt 2021-11-22 13:53:02 -05:00
Colin Griffin
09e601e74c add remark about SSL termination 2021-11-19 11:21:32 -05:00
Colin Griffin
3118d8fccb remove quotes from env sample 2021-11-19 11:00:02 -05:00
Colin Griffin
985f5a8b43 remove quotes from env sample 2021-11-19 10:59:45 -05:00
Colin Griffin
8194e32181 add missing env var samples 2021-11-19 10:58:26 -05:00
Colin Griffin
097f9177b3 add build args and temporarily remove alpine 2021-11-19 10:57:57 -05:00
Colin Griffin
6c6da94fa6 add build args and break out Prisma Studio 2021-11-19 10:57:00 -05:00
actions-user
970f7bed08 Auto updated submodule references 2021-11-19 04:19:43 +00:00
actions-user
7230c1eff0 Auto updated submodule references 2021-11-18 04:19:57 +00:00
Peer Richelsen
3381e079c5 Merge pull request #48 from calendso/revert-41-swc-fix
Revert "Fix 'Failed to load SWC binary' issue in Docker build process"
2021-11-18 00:23:21 +00:00
Peer Richelsen
42bc241ab5 Revert "Fix 'Failed to load SWC binary' issue in Docker build process" 2021-11-18 00:23:12 +00:00
Peer Richelsen
8f2603bbf3 Merge pull request #41 from Kovah/swc-fix
Fix 'Failed to load SWC binary' issue in Docker build process
2021-11-18 00:23:01 +00:00
actions-user
da9e73ee30 Auto updated submodule references 2021-11-17 04:20:06 +00:00
actions-user
0b7a81073d Auto updated submodule references 2021-11-16 04:19:56 +00:00
actions-user
d394e927a6 Auto updated submodule references 2021-11-14 04:19:45 +00:00
actions-user
8836a98fa7 Auto updated submodule references 2021-11-12 04:19:55 +00:00
actions-user
9ce0146a66 Auto updated submodule references 2021-11-11 04:19:52 +00:00
actions-user
d601dcfa96 Auto updated submodule references 2021-11-10 04:19:57 +00:00
actions-user
9de36f0f2b Auto updated submodule references 2021-11-09 04:19:53 +00:00
Kovah
77ffd4d785 Fix 'Failed to load SWC binary' issue in Docker build process 2021-11-08 16:27:22 +01:00
actions-user
40a59e538e Auto updated submodule references 2021-11-08 04:19:52 +00:00
actions-user
c1d2245b31 Auto updated submodule references 2021-11-07 04:19:25 +00:00
actions-user
1ebe570ac3 Auto updated submodule references 2021-11-06 04:19:37 +00:00
actions-user
9641ce9db7 Auto updated submodule references 2021-11-05 04:19:51 +00:00
Peer Richelsen
fe72d295d1 Merge pull request #37 from krumIO/configuration/database-env 2021-11-04 23:29:26 +00:00
Colin Griffin
8ed3910295 Merge branch 'main' into configuration/database-env 2021-11-04 09:17:25 -04:00
actions-user
f594f9a93a Auto updated submodule references 2021-11-04 04:19:36 +00:00
actions-user
0341ca249d Auto updated submodule references 2021-11-03 04:19:44 +00:00
actions-user
20d9315f05 Auto updated submodule references 2021-11-02 04:19:47 +00:00
actions-user
38061bef6e Auto updated submodule references 2021-11-01 04:19:51 +00:00
actions-user
8536af61bd Auto updated submodule references 2021-10-31 04:19:33 +00:00
actions-user
73839613aa Auto updated submodule references 2021-10-30 04:19:11 +00:00
actions-user
d27d84a543 Auto updated submodule references 2021-10-29 04:19:51 +00:00
Alex van Andel
295093101a Merge pull request #35 from krumIO/documentation/submodules
Update readme with submodule instructions
2021-10-27 19:53:09 +01:00
Colin Griffin
e3050102bd update readme with .env.example rename instructions 2021-10-27 13:09:48 -04:00
Colin Griffin
3726b561ea rename .env to .env.example to match calendso repo pattern 2021-10-27 13:08:30 -04:00
Colin Griffin
36982d1eaa add database_url to docker-compose to support env concatenation 2021-10-27 13:04:26 -04:00
Colin Griffin
6bf770a9c5 update readme with submodule instructions 2021-10-27 11:36:29 -04:00
actions-user
774491b753 Auto updated submodule references 2021-10-27 04:19:41 +00:00
actions-user
e126026db9 Auto updated submodule references 2021-10-26 04:19:26 +00:00
9 changed files with 248 additions and 55 deletions

32
.env
View File

@@ -1,32 +0,0 @@
POSTGRES_USER=unicorn_user
POSTGRES_PASSWORD=magical_password
POSTGRES_DB=calendso
DATABASE_HOST=db:5432
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}"
GOOGLE_API_CREDENTIALS='secret'
BASE_URL='http://localhost:3000'
NEXTAUTH_URL='http://localhost:3000'
# Remove this var if you don't want Calendso to collect anonymous usage
NEXT_PUBLIC_TELEMETRY_KEY=js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r
# Used for the Office 365 / Outlook.com Calendar integration
MS_GRAPH_CLIENT_ID=
MS_GRAPH_CLIENT_SECRET=
# Used for the Zoom integration
ZOOM_CLIENT_ID=
ZOOM_CLIENT_SECRET=
# E-mail settings
# Configures the global From: header whilst sending emails.
EMAIL_FROM='notifications@example.com'
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
EMAIL_SERVER_HOST='smtp.example.com'
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER='email_user'
EMAIL_SERVER_PASSWORD='email_password'
# Encryption key that will be used to encrypt CalDAV credentials, choose a random string, for example with `dd if=/dev/urandom bs=1K count=1 | md5sum`
CALENDSO_ENCRYPTION_KEY=''

48
.env.example Normal file
View File

@@ -0,0 +1,48 @@
# Set this value to 'agree' to accept our license:
# LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE
#
# Summary of terms:
# - The codebase has to stay open source, whether it was modified or not
# - You can not repackage or sell the codebase
# - Acquire a commercial license to remove these terms by emailing: license@cal.com
NEXT_PUBLIC_LICENSE_CONSENT=
LICENSE=
BASE_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
POSTGRES_USER=unicorn_user
POSTGRES_PASSWORD=magical_password
POSTGRES_DB=calendso
DATABASE_HOST=database:5432
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
GOOGLE_API_CREDENTIALS={}
# Remove this var if you don't want Calendso to collect anonymous usage
NEXT_PUBLIC_TELEMETRY_KEY=js.2pvs2bbpqq1zxna97wcml.oi2jzirnbj1ev4tc57c5r
# Used for the Office 365 / Outlook.com Calendar integration
MS_GRAPH_CLIENT_ID=
MS_GRAPH_CLIENT_SECRET=
# Used for the Zoom integration
ZOOM_CLIENT_ID=
ZOOM_CLIENT_SECRET=
# E-mail settings
# Configures the global From: header whilst sending emails.
EMAIL_FROM=notifications@example.com
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
EMAIL_SERVER_HOST=smtp.example.com
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=email_user
EMAIL_SERVER_PASSWORD=email_password
# Encryption key that will be used to encrypt CalDAV credentials, choose a random string, for example with `dd if=/dev/urandom bs=1K count=1 | md5sum`
CALENDSO_ENCRYPTION_KEY=
# It is highly recommended that the JWT secret must be overridden and very unique
JWT_SECRET=secret
NODE_ENV=production

View File

@@ -0,0 +1,70 @@
# This is a basic workflow to help you get started with Actions
name: Build and push image to DockerHub
# Controls when the workflow will run
on:
push:
branches: [main]
# update on run of Update Calendso nightly submodule update
workflow_run:
workflows: ["Update Calendso"]
branches: [main]
types:
- completed
# Allow running workflow manually from the Actions tab
workflow_dispatch:
# Leaving in example for releases. Initially we simply push to 'latest'
# on:
# release:
# types: [ created ]
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true
- name: Docker Login
# You may pin to the exact commit or the version.
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v1.10.0
with:
# Username used to log against the Docker registry
username: ${{ secrets.DOCKER_HUB_USERNAME }}
# Password or personal access token used to log against the Docker registry
password: ${{ secrets.DOCKER_HUB_TOKEN }}
# Log out from the Docker registry at the end of a job
logout: true # optional, default is true
- name: Set up Docker builder
id: buildx
uses: docker/setup-buildx-action@v1.6.0
- name: Build and push image
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
# The test image is /docker and is private. final image will be /calendso and public
tags: docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/calendso:latest
build-args: |
BASE_URL=http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# .env file
.env

View File

@@ -1,28 +1,40 @@
FROM node:14-alpine as deps FROM node:14 as deps
RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
COPY calendso/package.json calendso/yarn.lock ./ COPY calendso/package.json calendso/yarn.lock ./
COPY calendso/prisma prisma COPY calendso/prisma prisma
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
FROM node:14-alpine as builder FROM node:14 as builder
WORKDIR /app WORKDIR /app
ARG BASE_URL
ARG NEXT_PUBLIC_APP_URL
ARG NEXT_PUBLIC_LICENSE_CONSENT
ARG NEXT_PUBLIC_TELEMETRY_KEY
ENV BASE_URL=$BASE_URL \
NEXT_PUBLIC_APP_URL=$NEXT_PUBLIC_APP_URL \
NEXT_PUBLIC_LICENSE_CONSENT=$NEXT_PUBLIC_LICENSE_CONSENT \
NEXT_PUBLIC_TELEMETRY_KEY=$NEXT_PUBLIC_TELEMETRY_KEY
COPY calendso . COPY calendso .
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
FROM node:14-alpine as runner FROM node:14 as runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV production
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/next.config.js ./ COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/next-i18next.config.js ./ COPY --from=builder /app/next-i18next.config.js ./
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prisma ./prisma
COPY scripts scripts COPY scripts scripts
EXPOSE 3000 EXPOSE 3000
CMD ["/app/scripts/start.sh"] CMD ["/app/scripts/start.sh"]

View File

@@ -8,10 +8,22 @@
<a href="https://github.com/calendso/calendso-docker/issues">Community Support</a> <a href="https://github.com/calendso/calendso-docker/issues">Community Support</a>
</div> </div>
# calendso-docker # Docker
This image can be found on DockerHub at [https://hub.docker.com/repository/docker/calendso/calendso](https://hub.docker.com/repository/docker/calendso/calendso)
The Docker configuration for Calendso is an effort powered by people within the community. Calendso does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk. The Docker configuration for Calendso is an effort powered by people within the community. Calendso does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
## Important Notes
This Docker Image is managed by the Calendso Community. Support for this image can be found via the repository, located at [https://github.com/calendso/docker](https://github.com/calendso/docker)
Currently, this image is intended for local development/evaluation use only, as there are specific requirements for providing environmental variables at build-time in order to specify a non-localhost BASE_URL. (this is due to the nature of the static site compilation, which embeds the variable values). The ability to update these variables at runtime is in-progress and will be available in the future.
For Production, for the time being, please checkout the repository and build/push your own image privately.
## Requirements ## Requirements
Make sure you have `docker` & `docker-compose` installed on the server / system. Make sure you have `docker` & `docker-compose` installed on the server / system.
## Getting Started ## Getting Started
@@ -21,25 +33,55 @@ Make sure you have `docker` & `docker-compose` installed on the server / system.
```bash ```bash
git clone --recursive https://github.com/calendso/docker.git calendso-docker git clone --recursive https://github.com/calendso/docker.git calendso-docker
``` ```
2. Change into the directory 2. Change into the directory
```bash ```bash
cd calendso-docker cd calendso-docker
``` ```
3. Update `.env` if needed
3. Rename `.env.example` to `.env` and update `.env` if needed.
4. Build and start calendso 4. Build and start calendso
``` ```bash
docker-compose up --build docker-compose up --build
``` ```
5. Start prisma studio 5. Start prisma studio
```
```bash
docker-compose exec calendso npx prisma studio docker-compose exec calendso npx prisma studio
``` ```
6. Open a browser to [http://localhost:5555](http://localhost:5555) to look at or modify the database content. 6. Open a browser to [http://localhost:5555](http://localhost:5555) to look at or modify the database content.
7. Click on the `User` model to add a new user record. 7. Click on the `User` model to add a new user record.
8. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user.
8. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user.
9. Open a browser to [http://localhost:3000](http://localhost:3000) and login with your just created, first user. 9. Open a browser to [http://localhost:3000](http://localhost:3000) and login with your just created, first user.
## Git Submodules
This repository uses a git submodule.
If you cloned the repository without using `--recursive`, then you can initialize and clone the submodule with the following steps.
1. Init the submodule
```bash
git submodule init
```
2. Update the submodule
```bash
git submodule update --remote
```
For more advanced usage, please refer to the git documentation: [https://git-scm.com/book/en/v2/Git-Tools-Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
## Troubleshooting
* SSL edge termination: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service.

View File

@@ -1,22 +1,63 @@
# Use postgres/example user/password credentials # Use postgres/example user/password credentials
version: '3.1' version: '3.1'
volumes:
database-data:
networks:
stack:
external: false
services: services:
db: database:
image: postgres image: postgres
restart: always restart: always
volumes: volumes:
- database-data:/var/lib/postgresql/data/ - database-data:/var/lib/postgresql/data/
env_file: .env env_file: .env
ports: networks:
- 5432:5432 - stack
calendso: calendso:
build: . build:
context: .
dockerfile: Dockerfile
args:
- BASE_URL=${BASE_URL}
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL}
- NEXT_PUBLIC_LICENSE_CONSENT=${NEXT_PUBLIC_LICENSE_CONSENT}
- NEXT_PUBLIC_TELEMETRY_KEY=${NEXT_PUBLIC_TELEMETRY_KEY}
image: calendso/calendso:latest
restart: always restart: always
networks:
- stack
ports: ports:
- 3000:3000 - 3000:3000
env_file: .env
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
- NODE_ENV=development
depends_on:
- database
volumes:
- "./calendso:/app/"
- "./scripts:/app/scripts"
# Optional use of Prisma Studio. In production, comment out or remove the section below to prevent unwanted access to your database.
studio:
image: calendso/calendso:latest
restart: always
networks:
- stack
ports:
- 5555:5555 - 5555:5555
env_file: .env env_file: .env
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DATABASE_HOST}/${POSTGRES_DB}
depends_on: depends_on:
- db - database
volumes: command:
database-data: - npx
- prisma
- studio
# END SECTION: Optional use of Prisma Studio.

View File

@@ -1,6 +1,14 @@
#!/bin/sh #!/bin/bash
set -x set -x
/app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "db is up" # # Set environment variables
# echo NEXT_PUBLIC_APP_URL $NEXT_PUBLIC_APP_URL
# find \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i "s#$NEXT_PUBLIC_APP_URL#$NEXT_PUBLIC_APP_URL_SUBSTITUTE#g"
/app/scripts/wait-for-it.sh ${DATABASE_HOST} -- echo "database is up"
npx prisma migrate deploy npx prisma migrate deploy
yarn start if [[ $NODE_ENV == "development" ]]; then
yarn dev
else
yarn start
fi