-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
11,006 additions
and
10,638 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,28 @@ | ||
name: Deploy api to scaleway. | ||
|
||
|
||
# Run workflow on every push to master branch. | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
# Your workflows jobs. | ||
jobs: | ||
deploy_scw: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check-out your repository. | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to scaleway | ||
run: docker login rg.fr-par.scw.cloud/my-services -u nologin --password-stdin <<< ${{ secrets.SCW_SECRET_KEY }} | ||
|
||
- name: Docker build | ||
run: docker build -t adaptaviz-fr:latest -f Dockerfile.prod . | ||
|
||
- name: Docker tag | ||
run: docker tag adaptaviz-fr:latest rg.fr-par.scw.cloud/my-services/adaptaviz-fr:latest | ||
|
||
- name: Docker push in namespace | ||
run: docker push rg.fr-par.scw.cloud/my-services/adaptaviz-fr:latest |
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,15 @@ | ||
name: Lint | ||
|
||
on: ['pull_request'] | ||
jobs: | ||
js-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependecies | ||
run: yarn install --immutable --immutable-cache --check-cache | ||
|
||
- name: Run ESLint | ||
run: yarn run lint |
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,28 @@ | ||
FROM node:17.2-alpine | ||
|
||
RUN apk update | ||
|
||
ARG user=app_user | ||
ARG home=/home/$user | ||
RUN mkdir -p $home | ||
RUN addgroup -S app_group && adduser -S app_user -G app_group | ||
WORKDIR $home | ||
|
||
USER $user | ||
|
||
COPY --chown=$user . $home | ||
|
||
RUN rm -rf /home/app/score | ||
|
||
ENV HOST 0.0.0.0 | ||
ENV NUXT_HOST 0.0.0.0 | ||
ENV NODE_OPTIONS --max-old-space-size=5120 --openssl-legacy-provider | ||
ENV NPM_CONFIG_PRODUCTION false | ||
ENV NUXT_BASE_API_URL https://www.adaptaviz.fr/api | ||
|
||
RUN npm install | ||
RUN npm run build | ||
|
||
USER $user | ||
|
||
CMD ["npm", "start"] |
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
Oops, something went wrong.