fix slack, fix all apps.Dockerfile
This commit is contained in:
parent
545a3ced6d
commit
03bc3570cc
6 changed files with 75 additions and 8 deletions
|
@ -202,13 +202,13 @@ cd ../../
|
|||
|
||||
docker build . --build-arg APP_NAME="${APP_NAME}" \
|
||||
--build-arg APP_DIR="${APP_DIR}" \
|
||||
--build-arg SERVICE="saleor-app-${APP_NAME}" \
|
||||
--build-arg TITLE="djkato/saleor-app-${APP_NAME}" \
|
||||
--build-arg DESC="Saleor app for ${APP_NAME}" \
|
||||
--build-arg URL="https://github.com/saleor/saleor-app-${APP_NAME}" \
|
||||
--build-arg SERVICE="saleor-app-${APP_DIR}" \
|
||||
--build-arg TITLE="djkato/saleor-app-${APP_DIR}" \
|
||||
--build-arg DESC="Saleor app for ${APP_DIR}" \
|
||||
--build-arg URL="https://github.com/saleor/saleor-app-${APP_DIR}" \
|
||||
--build-arg SOURCE="https://github.com/djkato/saleor-dockerize-all-apps" \
|
||||
--build-arg AUTHORS="Saleor <hello@saleor.io>, Djkáťo <djkatovfx@gmail.com>" \
|
||||
-t ${CONTAINER_PUSH_URL}/saleor-app-${APP_NAME}:${VERSION}
|
||||
-t ${CONTAINER_PUSH_URL}/saleor-app-${APP_DIR}:${VERSION}
|
||||
'''
|
||||
|
||||
[tasks.build-arg-old-app]
|
||||
|
|
45
README.md
45
README.md
|
@ -29,7 +29,50 @@ Current apps in repo:
|
|||
|
||||
All apps from saleor/apps are upwards of 1.5gb in size, because of [this pnpm workspace error](https://github.com/vercel/next.js/issues/65636)
|
||||
|
||||
## How to use
|
||||
# How to use
|
||||
|
||||
These images include RedisAPL, and that's what I recommend to use it with. Besides that, use it like any other docker image.
|
||||
For example:
|
||||
|
||||
```yml
|
||||
services:
|
||||
app-payment-stripe:
|
||||
image: ghcr.io/djkato/saleor-app-payment-stripe:0.4.0
|
||||
env_file:
|
||||
- stripe.env
|
||||
networks:
|
||||
- saleor-app-tier
|
||||
depends_on:
|
||||
- redis-apl
|
||||
ports:
|
||||
- 3001:3001
|
||||
|
||||
redis-apl:
|
||||
image: bitnami/redis:latest
|
||||
environment:
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
- DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
|
||||
ports:
|
||||
- 6380:6379
|
||||
networks:
|
||||
- saleor-app-tier
|
||||
volumes:
|
||||
- redis-apl:/bitnami/redis/data
|
||||
|
||||
volumes:
|
||||
redis-apl:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: ./temp/volumes/redis/
|
||||
o: bind
|
||||
|
||||
networks:
|
||||
saleor-app-tier:
|
||||
driver: bridge
|
||||
```
|
||||
|
||||
## How to build
|
||||
- `./changes.sh` - applies git patches and batch edits via rust to add RedisAPL to all apps, and allow them to build via other tweaks.
|
||||
- `cargo make build-all` or `cargo make build-<Chosen app>`
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ RUN pnpm i
|
|||
|
||||
# Build the project
|
||||
COPY --from=builder /app/out/full/ .
|
||||
RUN turbo run build --filter="$APP_NAME"...
|
||||
RUN HOSTNAME="0.0.0.0" turbo run build --filter="$APP_NAME"...
|
||||
|
||||
|
||||
FROM base AS runner
|
||||
|
@ -61,7 +61,7 @@ COPY --from=installer --chown=nextjs:nodejs /app/node_modules ./node_modules
|
|||
# COPY --from=installer --chown=nextjs:nodejs /app/node_modules/react/jsx-runtime ./node_modules/react/jsx-runtime
|
||||
|
||||
WORKDIR /app/apps/$APP_DIR
|
||||
CMD node server.js
|
||||
CMD HOSTNAME="0.0.0.0" node server.js
|
||||
ARG SERVICE
|
||||
ARG TITLE
|
||||
ARG DESC
|
||||
|
|
|
@ -20,6 +20,7 @@ app_paths=(
|
|||
"apps/apps/segment"
|
||||
"apps/apps/slack"
|
||||
"apps/apps/taxjar"
|
||||
"apps/apps/smtp"
|
||||
"saleor-app-abandoned-checkouts"
|
||||
"saleor-app-payment-authorize.net"
|
||||
"saleor-app-payment-klarna"
|
||||
|
@ -39,6 +40,7 @@ redis_apl_target_paths=(
|
|||
"apps/apps/segment/src"
|
||||
"apps/apps/slack/src/lib"
|
||||
"apps/apps/taxjar"
|
||||
"apps/apps/smtp/src"
|
||||
"saleor-app-abandoned-checkouts"
|
||||
"saleor-app-payment-authorize.net/src"
|
||||
"saleor-app-payment-klarna/src"
|
||||
|
@ -100,3 +102,8 @@ for i in ${app_paths[*]}; do
|
|||
echo "installed ioredis for $i"
|
||||
cd "$CURR_PWD"
|
||||
done
|
||||
|
||||
# Individual patches
|
||||
cd ./all_apps/apps
|
||||
git appy "$CURR_PWD/patches/apps/slack/env.d.ts.patch"
|
||||
cd "$CURR_PWD"
|
||||
|
|
6
emails.test.env
Normal file
6
emails.test.env
Normal file
|
@ -0,0 +1,6 @@
|
|||
REDIS_URL=redis://redis-apl:6379/1
|
||||
APL=redis
|
||||
SECRET_KEY=idS8Oedýžfmg90S87Edfgnm90S87Dmfgiosuhbfs
|
||||
APP_IFRAME_BASE_URL=https://app-emails.kremik.sk
|
||||
APP_API_BASE_URL=https://app-emails.kremik.sk
|
||||
APP_LOG_LEVEL=info
|
11
patches/apps/slack/env.d.ts.patch
Normal file
11
patches/apps/slack/env.d.ts.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff --git a/apps/slack/env.d.ts b/apps/slack/env.d.ts
|
||||
index 58003aae..ee9f59ad 100644
|
||||
--- a/apps/slack/env.d.ts
|
||||
+++ b/apps/slack/env.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
- APL: "file" | "upstash" | "saleor-cloud";
|
||||
+ APL: "file" | "upstash" | "saleor-cloud" | "redis";
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue