Dockerize + CI
This commit is contained in:
parent
4dbe543892
commit
fc1e3a3bbb
|
@ -0,0 +1,16 @@
|
||||||
|
image: docker:19.03.8
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD https://registry.riksolo.com
|
||||||
|
- docker build . -t $IMAGE_TAG
|
||||||
|
- docker push $IMAGE_TAG
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM node:12
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install
|
||||||
|
ADD . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM php:7.4-apache
|
||||||
|
COPY --from=0 /usr/src/app/public/ /var/www/html/
|
Loading…
Reference in New Issue