Merge branch 'feat/dockerize' into 'develop'

Initial docker configuration
This commit is contained in:
Miguel Nogueira 2023-08-15 17:42:40 +00:00
commit d62272e6f2
9 changed files with 463 additions and 297 deletions

8
.dockerignore Normal file
View File

@ -0,0 +1,8 @@
# app is configured through docker-compose
.env
# deps are installed during build time
node_modules
vendor
# Let the framework create its own cache. we don't need your cache if you rebuild the image
/storage/*.*
!/storage/**/

34
Dockerfile Executable file
View File

@ -0,0 +1,34 @@
FROM php:8.1-fpm
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
unzip \
libcurl4-openssl-dev \
libonig-dev \
imagemagick \
libmagickwand-dev \
&& pecl install imagick \
&& docker-php-ext-enable imagick
RUN docker-php-ext-install gd pdo pdo_mysql zip curl mbstring xml
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
WORKDIR /var/www/html
COPY . .
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer update && composer install
RUN npm ci
# Set Laravel's permissions and setup storage, though this could be done in the COPY command directly
RUN chown -R www-data:www-data .
RUN chmod -R 755 /var/www/html/storage
RUN php artisan storage:link
EXPOSE 9000
CMD ["php-fpm"]

View File

@ -18,6 +18,7 @@ Have you ever gotten tired of managing your community's staff member application
- Controllable permissions - Every user has permissions! Control who has access to what (You can skip the application process and add staff members directly here).
- Account suspension system - Having trouble with pesky spammers? Suspend them! This will keep them from signing up or signing in until you lift their suspension.
- Notifications: Notifies slack and email primarily (Slack notifications currently broken)
- Complete API - Integrate your app/service with AthenaHR and automate processes (WIP)
And many more features!

View File

@ -33,12 +33,11 @@
"ultrono/markdown": "*"
},
"require-dev": {
"ext-xdebug": "*",
"barryvdh/laravel-debugbar": "^3.3",
"barryvdh/laravel-ide-helper": "^2.12",
"fakerphp/faker": "^1.19",
"laravel/pint": "^1.4",
"laravel/sail": "^1.15",
"laravel/sail": "^1.23",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.3",

638
composer.lock generated

File diff suppressed because it is too large Load Diff

55
docker-compose.yml Normal file
View File

@ -0,0 +1,55 @@
version: '3.8'
services:
athenahr_app:
image: gitlab.futuregamers.co:5050/webvokestudio/athenahr:latest
container_name: athenahr_app
volumes:
- ./:/var/www/html
ports:
- ":9000"
networks:
- athenahrdev_network
depends_on:
- mariadb
environment:
- DB_HOST=mariadb
- DB_DATABASE=athenahr
- DB_USERNAME=athenahr
- DB_PASSWORD=athenahr_db_pw
env_file:
- .env
mariadb:
image: mariadb:latest
container_name: athenahr_mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
environment:
- MYSQL_DATABASE=athenahr
- MYSQL_USER=athenahr
- MYSQL_PASSWORD=athenahr_db_pw
- MYSQL_ROOT_PASSWORD=athenahr_db_pw
volumes:
- mariadb_data:/var/lib/mysql
networks:
- athenahrdev_network
nginx:
image: nginx:latest
container_name: athenahr_nginx
volumes:
- ./:/var/www/html
- ./docker/nginx:/etc/nginx/conf.d
ports:
- "8989:80"
networks:
- athenahrdev_network
depends_on:
- athenahr_app
networks:
athenahrdev_network:
volumes:
mariadb_data:

View File

@ -0,0 +1,16 @@
server {
listen 80;
server_name athenahr.test;
location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass athenahr_app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/public$fastcgi_script_name;
}
}

3
package-lock.json generated
View File

@ -1,10 +1,9 @@
{
"name": "rbrecruiter-gc",
"name": "html",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "rbrecruiter-gc",
"hasInstallScript": true,
"dependencies": {
"@fullcalendar/core": "^4.4.0",

View File

@ -89,6 +89,4 @@
//! moment.js
//! moment.js language configuration
//! moment.js locale configuration