-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (35 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM node:18-bookworm-slim as web_node_deps
WORKDIR /app
COPY /web/patches ./patches
COPY --link /web/package.json ./package.json
COPY --link /web/yarn.lock ./yarn.lock
# Install dependencies
RUN yarn install --frozen-lockfile
FROM node:18-bookworm-slim as bots_node_deps
WORKDIR /app
COPY /bots/package.json ./package.json
COPY /bots/yarn.lock ./yarn.lock
# Install dependencies
RUN yarn install --frozen-lockfile
# Now copy all the sources so we can compile
FROM node:18-bookworm-slim AS web_node_builder
WORKDIR /app
COPY /web .
COPY --from=web_node_deps /app/node_modules ./node_modules
# Build the webapp
RUN yarn build --mode production
FROM ghcr.io/oostvoort/keiko:0.0.21 AS runtime
ENV PUBLIC_TORII=http://localhost:8080
ENV VITE_PUBLIC_ETH_CONTRACT_ADDRESS=0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
HEALTHCHECK CMD (curl --fail http://localhost:3000 && curl --fail http://localhost:5050) || exit 1
WORKDIR /keiko
COPY --link ./startup.sh ./startup.sh
COPY --from=web_node_builder /app/dist static/
COPY --link ./web/.env.example .env.core.example
COPY ./bots ./bots
COPY --link ./bots/.env.production ./bots/.env
COPY --from=bots_node_deps /app/node_modules ./bots/node_modules
COPY ./contracts ./contracts
RUN sozo build --manifest-path ./contracts/Scarb.toml
LABEL org.opencontainers.image.description = "PixeLAW core container"
CMD ["bash", "./startup.sh"]