Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Nov 5, 2024
1 parent 7fb45fd commit 6056f88
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
12 changes: 8 additions & 4 deletions dashboard/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ RUN pnpm build

############

FROM nginx:1.17.6-alpine AS client-nginx
FROM nginx:1.27.1-alpine3.20 AS client-nginx

COPY --from=client-build /srv/workspace/dashboard/client/dist /var/app
COPY ./dashboard/client/docker/nginx/conf.d /etc/nginx/conf.d
COPY ./dashboard/client/docker/start-server.sh /

RUN apk add --no-cache libstdc++ \
RUN apk update \
&& apk add --no-cache \
libstdc++ \
curl \
openssl \
&& apk add --virtual .build \
wget \
&& mkdir -p /var/docker \
Expand All @@ -37,10 +41,10 @@ EXPOSE 80
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=${SENTRY_RELEASE}

COPY --chown=node:node ./lib/bash/configurator /var/app//configurator

COPY ./dashboard/client/config-compiler.js /var/app/

COPY ./lib/bash/configurator /var/app/configurator

WORKDIR /var/app

CMD ["/start-server.sh"]
5 changes: 2 additions & 3 deletions dashboard/client/docker/start-server.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/sh

set -ex

/var/app//configurator/get-config.sh

echo 'OK'

/var/app/configurator/get-config.sh

#/var/docker/generate-env ./
nginx -g 'daemon off;'
2 changes: 1 addition & 1 deletion databox/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN NODE_OPTIONS="--max-old-space-size=8192" && pnpm build

############

FROM nginx:1.17.6-alpine AS client-nginx
FROM nginx:1.27.1-alpine3.20 AS client-nginx

COPY --from=client-build /srv/workspace/databox/client/dist /var/app
COPY ./databox/client/docker/nginx/conf.d /etc/nginx/conf.d
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
a_client:
volumes:
- ./lib/js:/srv/workspace/lib/js:rw
- ./lib/bash:/srv/workspace/lib/bash:rw
- ./package.json:/srv/workspace/package.json:ro
- ./pnpm-workspace.yaml:/srv/workspace/pnpm-workspace.yaml:ro
- ./turbo.json:/srv/workspace/turbo.json:ro
Expand All @@ -15,10 +14,11 @@ services:
service: a_client
image: ${REGISTRY_NAMESPACE}dashboard-dev:${DOCKER_TAG}
build:
target: client-nginx
target: client-build
volumes:
- ./dashboard/client:/srv/workspace/dashboard/client:rw
- ./dashboard/client/docker/start-server.sh:/start-server.sh:rw
- ./lib/bash/configurator:/var/app/configurator:rw
environment:
- WDS_SOCKET_PORT=443

Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,22 @@ services:
- MATOMO_URL
- SENTRY_DSN=${CLIENT_SENTRY_DSN}
- SENTRY_ENVIRONMENT
- S3_ENDPOINT
- S3_PATH_PREFIX
- S3_ACCESS_KEY
- S3_SECRET_KEY
- S3_REGION
- CONFIGURATOR_STORAGE_BUCKET_NAME
- CONFIGURATOR_STORAGE_USE_PATH_STYLE_ENDPOINT
- VERIFY_SSL
volumes:
- ./configs:/configs
labels:
- "traefik.enable=true"
- "traefik.project_name=${COMPOSE_PROJECT_NAME}"
extra_hosts:
- soketi.${PHRASEA_DOMAIN}:${PS_GATEWAY_IP}
- minio.${PHRASEA_DOMAIN}:${PS_GATEWAY_IP}

a_api-php:
profiles:
Expand Down
2 changes: 1 addition & 1 deletion expose/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN pnpm build

############

FROM nginx:1.17.6-alpine AS client-nginx
FROM nginx:1.27.1-alpine3.20 AS client-nginx

COPY --from=client-build /srv/workspace/expose/client/dist /var/app
COPY ./expose/client/docker/nginx/conf.d /etc/nginx/conf.d
Expand Down
2 changes: 1 addition & 1 deletion lib/bash/configurator/get-config.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

set -ex

Expand Down
2 changes: 1 addition & 1 deletion uploader/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN pnpm build

############

FROM nginx:1.17.6-alpine AS client-nginx
FROM nginx:1.27.1-alpine3.20 AS client-nginx

COPY --from=client-build /srv/workspace/uploader/client/dist /var/app
COPY ./uploader/client/docker/nginx/conf.d /etc/nginx/conf.d
Expand Down

0 comments on commit 6056f88

Please sign in to comment.