forked from hyli-org/wallet
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.ui
More file actions
39 lines (28 loc) · 944 Bytes
/
Dockerfile.ui
File metadata and controls
39 lines (28 loc) · 944 Bytes
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
# Étape de build
FROM oven/bun:latest AS build
# Définir le répertoire de travail
WORKDIR /app
# Copier les fichiers de l'application
COPY front/package.json front/bun.lock ./
# Installer les dépendances
RUN bun install
# Copier le reste des fichiers de l'application
COPY front .
COPY front/.env.production .env
# Construire l'application
RUN bun run build
# Étape de production
FROM nginx:1.21.5-alpine AS production
# Installer gettext pour envsubst
RUN apk add --no-cache gettext
# Copier les fichiers de build depuis l'étape de build
COPY --from=build /app/dist /usr/share/nginx/html
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
# Copier le script de configuration
COPY front/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
# Exposer le port 80
EXPOSE 80
# Utiliser le script d'entrée personnalisé
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]