-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: reposition php code in the folder (#25)
refactor: rename login/ -> php/\n\ncalling the folder php is more representative of what there is inside refactor: move files from public folder to private refactor: move Dockerfile in their own folder
- Loading branch information
Showing
14 changed files
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# node 20, build the application | ||
FROM node:20.12.2-alpine3.19 | ||
COPY Interface . | ||
COPY ../Interface . | ||
RUN npm install | ||
RUN npm run build | ||
|
||
|
||
# nginx 1.26 on port 80, keep the build output, nginx config | ||
FROM nginx:1.26-alpine-otel | ||
EXPOSE 80 | ||
COPY --from=0 ./dist /var/www/memoires-info/html | ||
COPY .env /var/www/memoires-info/html/.env | ||
COPY --from=0 ../dist /var/www/memoires-info/html | ||
COPY ../.env /var/www/memoires-info/html/.env | ||
|
||
# copy the nginx config | ||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf | ||
COPY ../nginx.conf /etc/nginx/conf.d/default.conf | ||
RUN sed -i '/location \/adminer\//,/}/d' /etc/nginx/conf.d/default.conf | ||
# copy php files for ngnix to know they exist | ||
COPY login/public /var/www/memoires-info/php/public | ||
COPY ../php/public /var/www/memoires-info/php/public | ||
|
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,13 @@ | ||
# php 8.3 with the files, install dependencies | ||
FROM composer:2.7 | ||
COPY ../php . | ||
RUN composer install | ||
|
||
# copy required files to new image | ||
FROM php:8.3-fpm-alpine | ||
COPY ../php/public /var/www/memoires-info/php/public | ||
COPY ../php/private /var/www/memoires-info/php/private | ||
COPY ../php/lib.php /var/www/memoires-info/php | ||
COPY ../.env /var/www/memoires-info/php/ | ||
COPY --from=0 ../app/vendor /var/www/memoires-info/php/vendor | ||
|
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,2 @@ | ||
<?php | ||
require_once __DIR__ . '/../private/esp.php'; |
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,2 @@ | ||
<?php | ||
require_once __DIR__ . '/../private/login.php'; |