Skip to content

Commit

Permalink
Add action to build backend image.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Nov 9, 2023
1 parent 2cbd045 commit e85a2aa
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Generate Docker Containers

on:
push:
tags:
- '*'

jobs:
backend:
name: Build backend image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
working-directory: backend
run: docker build -t daemontus/bbm-backend .

15 changes: 15 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Container is based on Alpine linux with node.js preinstalled.
FROM node:alpine
WORKDIR /usr/mynodeapp

# Copy backend files.
COPY ./ ./

# Install project dependencies.
RUN npm install

# The port on which the backend is running.
EXPOSE 3000

# Run server.
CMD ["npm", "start"]

0 comments on commit e85a2aa

Please sign in to comment.