-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(namadillo): namadillo docker setup
- Loading branch information
1 parent
7d36081
commit fc18ecc
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM rust:1.79 as builder | ||
WORKDIR /app | ||
RUN apt update && apt install -y nodejs npm clang pkg-config libssl-dev protobuf-compiler curl | ||
RUN npm install -g yarn | ||
RUN rustup target add wasm32-unknown-unknown | ||
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y | ||
COPY ./.yarnrc.yml . | ||
COPY ./.yarn ./.yarn | ||
COPY ./tsconfig.base.json . | ||
COPY ./package.json . | ||
COPY ./yarn.lock . | ||
COPY ./packages ./packages | ||
COPY ./scripts ./scripts | ||
COPY ./apps/namadillo/package.json ./apps/namadillo/package.json | ||
RUN yarn | ||
WORKDIR /app/apps/namadillo | ||
COPY ./apps/namadillo . | ||
RUN yarn | ||
RUN yarn build | ||
|
||
FROM nginx:alpine | ||
COPY --from=builder /app/apps/namadillo/dist /usr/share/nginx/html | ||
COPY ./docker/namadillo.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ $uri.html /index.html; | ||
} | ||
|
||
gzip on; | ||
gzip_types text/plain text/css application/javascript application/json application/vnd.ms-fontobject application/xml+rss application/atom+xml font/opentype font/ttf image/svg+xml; | ||
location ~* \.(?:ico|css|js|gif|jpe?g|png|svg|woff2?|ttf|eot)$ { | ||
expires 1y; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
} |