Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update from base repo #2

Merged
merged 8 commits into from
Oct 5, 2023
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
Loading