Skip to content

Commit

Permalink
Initial public release :)
Browse files Browse the repository at this point in the history
  • Loading branch information
cioraneanu committed May 3, 2024
0 parents commit bdf109e
Show file tree
Hide file tree
Showing 693 changed files with 32,422 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
back/vendor
36 changes: 36 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build docker image

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags)
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.repository }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/firefly-pico:latest , ${{ secrets.DOCKERHUB_USERNAME }}/firefly-pico:${{ github.ref_name }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist
.idea
63 changes: 63 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
ARG REGISTRY=docker.io/stsdockerhub
ARG LARAVEL_ALPINE_VERSION=8.3.2-laravel-alpine3.19

FROM ${REGISTRY}/php:${LARAVEL_ALPINE_VERSION}-build as build-container

WORKDIR /var/www/html

COPY back .

COPY back/.env.example .env


#RUN composer install --no-dev \
# && php artisan key:generate \
# && tar --owner=www-data --group=www-data --exclude=.git -czf /tmp/app-back.tar.gz .

ENV COMPOSER_ALLOW_SUPERUSER=1
#RUN rm -rf vendor/
RUN composer install --no-dev
RUN php artisan key:generate
#RUN php artisan migrate
RUN tar --owner=www-data --group=www-data --exclude=.git -czf /tmp/app-back.tar.gz .

# ================================

WORKDIR /var/www/html/front

COPY front .

#COPY front/.env.example .env


RUN npm install \
&& npm run build \
&& tar --owner=www-data --group=www-data --exclude=.git -czf /tmp/app-front.tar.gz .


# ================================

FROM ${REGISTRY}/php:${LARAVEL_ALPINE_VERSION}-build

WORKDIR /var/www/html

COPY --from=build-container /tmp/app-back.tar.gz .

RUN tar -xf app-back.tar.gz \
&& rm -rf app-back.tar.gz

WORKDIR /var/www/html/front

COPY --from=build-container /tmp/app-front.tar.gz .

RUN tar -xf app-front.tar.gz \
&& rm -rf app-front.tar.gz


COPY docker/conf/supervisor/node.ini /etc/supervisor.d
COPY docker/conf/nginx/default.conf /etc/nginx/http.d


# Configure entrypoint
COPY docker/docker-entrypoint.d /docker-entrypoint.d/
RUN chmod +x /docker-entrypoint.d/*
Loading

0 comments on commit bdf109e

Please sign in to comment.