Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1ab1290
updated versions
Jul 29, 2023
b3f28c5
first commit for docker build
Jul 29, 2023
415659a
first version
Jul 29, 2023
ddcd06f
removed useless build info
Jul 29, 2023
c4efccc
first version
leolivier Jul 29, 2023
c146c54
moved and tweaked
leolivier Jul 29, 2023
e3811fe
moved to subdir and updated to 1. embed the fcms code 2. automate the…
leolivier Jul 29, 2023
5986dd8
first version
leolivier Jul 29, 2023
13b2b73
moved
leolivier Jul 29, 2023
172add7
moved
leolivier Jul 29, 2023
e0069d6
updated
leolivier Jul 29, 2023
89b61c7
fixed error on commands
leolivier Jul 29, 2023
cca14c7
moved to docker folder
leolivier Jul 30, 2023
9aa7ede
changed for embedded apache version and non embedded .env
leolivier Jul 30, 2023
9732349
Changed to be based on php:apache and remove nginx
leolivier Jul 30, 2023
7f9d46f
updated for apache
leolivier Jul 30, 2023
0a528bb
Merge branch 'ryanhowdy:4.0.0' into 4.0.0
leolivier Nov 5, 2023
b03b676
Merge pull request #1 from leolivier/4.0.0
leolivier Nov 5, 2023
189f7f5
added doc for generating multi target
leolivier Nov 12, 2023
664dc94
updated for new laravel version
leolivier Nov 12, 2023
4e7c6ba
removed apache in favor of artisan serve
leolivier Nov 12, 2023
397d360
changed port according to dockerfile and added a local volume for the…
leolivier Nov 12, 2023
3a6a9ce
updated version
leolivier Nov 12, 2023
98a75e4
changed image tag
leolivier Nov 12, 2023
da7fcb8
moved docker files at root
leolivier Nov 13, 2023
3c93016
issue on .env mount
leolivier Nov 13, 2023
1f93e84
update doc
leolivier Nov 13, 2023
810c08b
changed image repo to ryan's
leolivier Jun 28, 2024
e3424ba
added port in Dockerfile CMD
leolivier Oct 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .env.docker.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
APP_NAME="Family Connections"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_PORT=8003
APP_URL=http://<you docker host here>:${APP_PORT}

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=fcms
DB_USERNAME=fcms_user
DB_PASSWORD=******your password here***********

CACHE_DRIVER=file
BROADCAST_DRIVER=log
FILESYSTEM_DRIVER=local

QUEUE_CONNECTION=sync
#SESSION_DRIVER=cookie
SESSION_DRIVER=file
SESSION_LIFETIME=120

#MEMCACHED_HOST=127.0.0.1

FCMS_WEEK_START=0
FCMS_WEEK_END=6
FCMS_VERSION="4.0.0-docker"
FCMS_CONTACT=
FCMS_AUTO_ACTIVATE=false
FCMS_ALLOW_REGISTRATION=true
FCMS_FULL_SIZE_PHOTOS=false
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM php:8.2-fpm-alpine

# Arguments defined in docker-compose.yml
ARG user=fcms
ARG uid=1000

# install helper for installing php extensions
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# install php extensions
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions @composer pdo_mysql exif pcntl gd imagick

# Set working directory
WORKDIR /fcms

# Create system user to run Composer and Artisan Commands
RUN addgroup -S $user && \
adduser -G $user -G www-data -G root -u $uid -h /home/$user -S $user && \
mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user
# Copy the fcms code
COPY --chown=$user:www-data . .
RUN \
# clean unused folders and locking files
rm -rf vendor composer.lock .git tests && \
# Install everything
composer install --no-dev

# Set user
USER $user

HEALTHCHECK --interval=5m --timeout=3s --start-period=10s \
CMD curl -f http://localhost:8000/ || exit 1

ENTRYPOINT [ "./docker_init.sh" ]
CMD [ "php", "artisan", "serve", "--host=0.0.0.0", "--port", "8000" ]
EXPOSE 8000
15 changes: 15 additions & 0 deletions README.docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# New features
fcms is automatically setup from your .env file.
Build it using the docker/.env.example file

# Building a docker image
Run `docker build -t fcms .`
Or for multiple targets: `docker buildx build -t fcms --platform linux/arm64,linux/amd64 --push .`

# Running the image
Copy the docker/docker-compose.yml file in a new directory, create in this directory a .env file based on the .env.docker.example file.
If you built your own image, change the docker-compose file to use this image, otherwise change the name:tag of the image to pick it from a repo (ie ghcr.io/leolivier/fcms:artisan).
Run `docker compose up -d` in this directory
This will download the image for mariadb, and use the previously built image of fcms or download the image from the repo and start them.
Go to http://<your host>:8003 (if you didn't change the defaultport in .env)
Enjoy...
Loading