mirror of
https://github.com/SrIzan10/nodejs-java13.git
synced 2026-06-27 19:02:31 +00:00
dockerfile and ci added
This commit is contained in:
19
.github/workflows/dockerpush.yml
vendored
Normal file
19
.github/workflows/dockerpush.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: Push to docker.
|
||||||
|
on: [push] # When pushing to any branch then run this action
|
||||||
|
# Env variable
|
||||||
|
env:
|
||||||
|
DOCKER_USER: ${{secrets.DOCKER_USER}}
|
||||||
|
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
|
||||||
|
REPO_NAME: ${{secrets.REPO_NAME}}
|
||||||
|
jobs:
|
||||||
|
push-image-to-docker-hub: # job name
|
||||||
|
runs-on: ubuntu-latest # runner name : (ubuntu latest version)
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2 # first action : checkout source code
|
||||||
|
- name: docker login
|
||||||
|
run: | # log into docker hub account
|
||||||
|
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
|
||||||
|
- name: Build the Docker image # push The image to the docker hub
|
||||||
|
run: docker build . --file Dockerfile --tag $DOCKER_USER/$REPO_NAME:latest
|
||||||
|
- name: Docker Push
|
||||||
|
run: docker push $DOCKER_USER/$REPO_NAME:latest
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM node:alpine
|
||||||
|
|
||||||
|
RUN apk update
|
||||||
|
|
||||||
|
RUN apk add openjdk13 wget
|
||||||
|
|
||||||
|
RUN mkdir /lavalink
|
||||||
|
|
||||||
|
RUN cd /lavalink && wget https://github.com/freyacodes/Lavalink/raw/master/LavalinkServer/application.yml.example -O application.yml
|
||||||
|
|
||||||
|
RUN cd /lavalink && wget https://ci.fredboat.com/repository/download/Lavalink_Build/9447:id/Lavalink.jar
|
||||||
|
|
||||||
|
CMD cd /lavalink && java -jar Lavalink.jar
|
||||||
Reference in New Issue
Block a user