mirror of
https://github.com/NotAShelf/catApi.git
synced 2026-01-16 15:40:50 +00:00
Compare commits
No commits in common. "f4ad0b5640b1ad3a920609eb500b9a8d9b832207" and "2a734633184cdd36a2d043833121effdf95dd58c" have entirely different histories.
f4ad0b5640
...
2a73463318
4 changed files with 55 additions and 16 deletions
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
node_modules/
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
9
.github/workflows/go.yml
vendored
9
.github/workflows/go.yml
vendored
|
|
@ -2,11 +2,12 @@ name: Go
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["v2"]
|
branches: [ "v2" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["v2"]
|
branches: [ "v2" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -15,10 +16,10 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.23"
|
go-version: '1.20'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v ./..
|
run: go build -v ./.
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v3.1.3
|
||||||
|
|
|
||||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
FROM node:17
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /opt/catApi
|
||||||
|
# and copy files into that directory
|
||||||
|
COPY . ./
|
||||||
|
|
||||||
|
RUN npm install -g npm@8 && npm install --save-dev
|
||||||
|
|
||||||
|
CMD npm start
|
||||||
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
## DO NOT USE ##
|
||||||
|
services:
|
||||||
|
catweb:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "${PORT}:${PORT}"
|
||||||
|
command: npm start
|
||||||
|
container_name: catApi
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: ./images
|
||||||
|
target: /opt/catApi/images
|
||||||
|
- type: bind
|
||||||
|
source: ./.env
|
||||||
|
target: /opt/catApi/.env
|
||||||
|
tmpfs: /tmp # temp files such are stored here
|
||||||
|
working_dir: /opt/catApi
|
||||||
|
tty: true
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production # for production
|
||||||
|
- LOG_LEVEL=debug # debug, info, warn, error
|
||||||
|
- FORCE_COLOR=3 # force color output
|
||||||
Loading…
Add table
Add a link
Reference in a new issue