-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from infracloudio/acornfile
nodejs acornfile
- Loading branch information
Showing
15 changed files
with
3,217 additions
and
0 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,29 @@ | ||
name: Publish Acorn image | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "v[0-9]*" | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: acorn-io/actions-setup@v2 | ||
with: | ||
acorn-version: "main" | ||
- name: Login to GHCR | ||
uses: acorn-io/actions-login@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and Publish with signature | ||
run: | | ||
TAG=${GITHUB_REF#refs/*/} | ||
acorn build --platform linux/amd64 --platform linux/arm64 --push -t ghcr.io/infracloudio/nodejs-acorn:${TAG} . |
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 @@ | ||
node_modules |
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: "Nodejs Sample Acorn" | ||
description: "Acorn running a Battleship game build using nodejs" | ||
readme: "./README.md" | ||
icon: "./nodejs.svg" | ||
|
||
containers: { | ||
server: { | ||
build: { | ||
context: "." | ||
dockerfile: "./Dockerfile" | ||
} | ||
dirs: "/usr/src/app": "./" | ||
ports: publish: "3000:3000/http" | ||
} | ||
} |
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,20 @@ | ||
# Dockerfile for React client | ||
|
||
# Build react client | ||
FROM node:20.1.0-alpine | ||
|
||
# Working directory be app | ||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
|
||
### Installing dependencies | ||
|
||
RUN npm install --silent | ||
|
||
# copy local files to app folder | ||
COPY . . | ||
|
||
EXPOSE 3000 | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Acorn for Nodejs sample app - Battleship Game | ||
====== | ||
|
||
Node.js is a cross-platform, open-source server environment that can run on Windows, Linux, Unix, macOS, and more. Node.js is a back-end JavaScript runtime environment, runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser. | ||
|
||
Here we have a Battelship game using [this repo](https://github.com/kubowania/battleships). There are two options available you can play it as a single player or multiplayer. If you are playing it as multiplayer select multiplayer and then open the link in the second browser which will act as second player. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.