Skip to content

Commit

Permalink
Try for a streamlined docker app, without dev dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Dumais <[email protected]>
  • Loading branch information
marcdumais-work committed Mar 6, 2024
1 parent 86ea564 commit 55f9ed0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
retry_on: error
command: |
cd examples/docker
docker build -t tte .
docker build --no-cache -t tte .
on_retry_command: cd ../..

- name: run docker image
Expand Down
10 changes: 8 additions & 2 deletions examples/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ RUN apt-get update && apt-get install -y \
COPY example-package.json /app/tte/package.json
WORKDIR /app/tte/
RUN yarn && \
npx theia build --app-target=\"browser\" --mode development && \
npx theia build --app-target=\"browser\" --mode production && \
yarn autoclean --init && \
echo *.ts >> .yarnclean && \
echo *.ts.map >> .yarnclean && \
echo *.spec.* >> .yarnclean && \
du -hs /app/tte && \
du -hs /app/tte/node_modules && \
yarn --production && \
yarn cache clean && \
du -hs /app/tte
du -hs /app/tte && \
du -hs /app/tte/node_modules && \
du -hs /app/tte/lib &&


FROM node:16.20.2-bookworm-slim

Expand Down
3 changes: 2 additions & 1 deletion examples/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/env bash
yarn start --hostname 0.0.0.0 --port 4000
node ./src-gen/backend/main.js --hostname 0.0.0.0 --port 4000
# yarn start --hostname 0.0.0.0 --port 4000

0 comments on commit 55f9ed0

Please sign in to comment.