Skip to content

Commit

Permalink
chore: update to node version 18 (5e-bits#548)
Browse files Browse the repository at this point in the history
* chore: update node version

* chore: update node version in dockerfile

* chore: upgrade dev deps to align with api repo

* chore: update ci to node18
  • Loading branch information
ecshreve authored and markpol committed Oct 5, 2023
1 parent 7c4f9ec commit 3415490
Show file tree
Hide file tree
Showing 5 changed files with 6,164 additions and 19,953 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:
name: Run linter
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- run: npm install
- run: npm run lint

test:
name: Run tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- run: npm install
- run: npm run test

Expand All @@ -42,11 +42,11 @@ jobs:
needs: [test, lint]
if: ${{ github.event_name != 'pull_request' && github.repository == '5e-bits/5e-database' }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x
- name: Refresh DB contents
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
Expand All @@ -64,7 +64,7 @@ jobs:
version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- name: Checkout latest code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Semantic Release
Expand All @@ -86,15 +86,15 @@ jobs:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ RUN apt-get update \
&& apt-get -y install curl \
&& apt-get clean \
&& rm -rf /var/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs \
&& apt-get clean \
&& rm -rf /var/apt/lists/*

ENV MONGODB_URI mongodb://localhost/5e-database
ENV MONGODB_URI mongodb://localhost:27017/5e-database

## Add code
WORKDIR /data/db2
Expand All @@ -29,9 +29,9 @@ COPY --chown=mongodb:mongodb . /data/db2/
RUN mongod --fork --logpath /var/log/mongodb.log --dbpath /data/db2 \
&& npm run db:refresh \
&& mongod --dbpath /data/db2 --shutdown \
&& chown -R mongodb /data/db2
&& chown -R mongodb:mongodb /data/db2

# Make the new dir a VOLUME to persists it
# Make the new dir a VOLUME to persists it
VOLUME /data/db2

HEALTHCHECK CMD curl --connect-timeout 10 --silent --fail http://localhost:27017 || exit 1
Expand Down
Loading

0 comments on commit 3415490

Please sign in to comment.