Skip to content

Commit e505906

Browse files
committed
build
1 parent f345e49 commit e505906

File tree

4 files changed

+84
-2
lines changed

4 files changed

+84
-2
lines changed

.env.exemple

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
ENABLE_BYSMS=true
21
API_URL=http://monserveruSesame:4000
3-
REDIRECT_PAGE=https://mapage..fr
42
API_KEY=MACLE_API

.github/workflows/lint.yml

Whitespace-only changes.

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version_increment:
7+
description: 'La version a incrémenter (major, minor, patch)'
8+
required: true
9+
default: 'patch'
10+
type: choice
11+
options:
12+
- 'major'
13+
- 'minor'
14+
- 'patch'
15+
build_docker_image:
16+
description: "Construire l'image docker ?"
17+
required: true
18+
default: true
19+
type: boolean
20+
latest:
21+
description: "Tagger l'image docker avec le tag 'latest' ?"
22+
required: true
23+
default: true
24+
type: boolean
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: write
31+
packages: write
32+
33+
steps:
34+
- name: Build docker
35+
uses: Libertech-FR/lt-actions/release@main
36+
with:
37+
version_increment: ${{ github.event.inputs.version_increment }}
38+
build_docker_image: ${{ github.event.inputs.build_docker_image }}
39+
latest: ${{ github.event.inputs.latest }}
40+
repository: ${{ github.repository }}
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
access_token: ${{ secrets.GITHUB_TOKEN }}
44+
github_token: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM node:20-bookworm-slim
2+
3+
ARG NODE_ENV=production
4+
ENV NODE_ENV=${NODE_ENV}
5+
ENV NODE_OPTIONS=--openssl-legacy-provider
6+
7+
WORKDIR /data
8+
9+
# Install dependencies. Note that the package names and the package manager are different for Debian-based images.
10+
RUN apt-get update && apt-get -y --no-install-recommends upgrade && apt-get install -y --no-install-recommends \
11+
git \
12+
jq \
13+
nano \
14+
vim \
15+
bash \
16+
bash-completion \
17+
iputils-ping \
18+
telnet \
19+
dnsutils \
20+
net-tools \
21+
tcpdump \
22+
&& apt-get clean \
23+
&& rm -rf /var/lib/apt/lists/*
24+
25+
COPY . .
26+
27+
RUN yarn install \
28+
--prefer-offline \
29+
--frozen-lockfile \
30+
--non-interactive \
31+
--production=false
32+
# && yarn cache clean \
33+
# && yarn autoclean --init \
34+
# && yarn autoclean --force
35+
36+
RUN yarn build
37+
38+
EXPOSE 3000
39+
40+
CMD ["yarn", "run", "start:prod"]

0 commit comments

Comments
 (0)