Add Dockerfile #22

Closed
opened 2020-07-09 00:17:04 +02:00 by Ghost · 1 comment
Ghost commented 2020-07-09 00:17:04 +02:00 (Migrated from koodu.ubiqueros.com)

Placeholder to reference PR 21 for those interested in Docker deployments of fipamo

The PR has a rough / initial Dockerfile setup that's not tuned but will work for non-production deployments and testing of fipamo.

Please note the EXPOSE and VOLUME directives in the Dockerfile, you'll want to keep those in mind for your Docker run command and any deployments that need persistence or reverse http(s) proxying. For the files that are listed as VOLUMEs, please touch the file on the local system before passing the file through to the container. Fipamo should reset the contents of the file on first run.

The docker file also uses an ENTRYPOINT of /usr/local/bin/npm and a CMD directive to run the fipamo instance as the active app. If you'd like to run other npm commands against the sources, just add them to the end of the docker run command.

Sample commands to build / run for testing purposes:


# Clone + Build container
git clone https://code.playvicio.us/Are0h/Fipamo.git /opt/fipamo
cd /opt/fipamo
docker build -t test/fipamo:latest .

# Prep persistent storage
mkdir /var/fipamo
mkdir /var/fipamo/public
mkdir /var/fipamo/content
mkdir /var/fipamo/site
touch /var/fipamo/config.json
touch /var/fipamo/site-settings.json

# Run fipamo as a Docker container
docker run --rm -it -p 2314:2314 \
  -v /var/fipamo/public:/opt/fipamo/public \
  -v /var/fipamo/content:/opt/fipamo/content \
  -v /var/fipamo/site:/opt/fipamo/site \
  -v /var/fipamo/config.json:/opt/fipamo/config.json \
  -v /var/fipamo/site-settings.json:/var/fipamo/site-settings.json \
  test/fipamo:latest

Placeholder to reference PR 21 for those interested in Docker deployments of fipamo The PR has a rough / initial Dockerfile setup that's not tuned but will work for non-production deployments and testing of fipamo. Please note the ```EXPOSE``` and ```VOLUME``` directives in the Dockerfile, you'll want to keep those in mind for your Docker run command and any deployments that need persistence or reverse http(s) proxying. For the files that are listed as ```VOLUME```s, please touch the file on the local system before passing the file through to the container. Fipamo should reset the contents of the file on first run. The docker file also uses an ```ENTRYPOINT``` of ```/usr/local/bin/npm``` and a ```CMD``` directive to run the fipamo instance as the active app. If you'd like to run other ```npm``` commands against the sources, just add them to the end of the ```docker run``` command. Sample commands to build / run for testing purposes: ```sh # Clone + Build container git clone https://code.playvicio.us/Are0h/Fipamo.git /opt/fipamo cd /opt/fipamo docker build -t test/fipamo:latest . # Prep persistent storage mkdir /var/fipamo mkdir /var/fipamo/public mkdir /var/fipamo/content mkdir /var/fipamo/site touch /var/fipamo/config.json touch /var/fipamo/site-settings.json # Run fipamo as a Docker container docker run --rm -it -p 2314:2314 \ -v /var/fipamo/public:/opt/fipamo/public \ -v /var/fipamo/content:/opt/fipamo/content \ -v /var/fipamo/site:/opt/fipamo/site \ -v /var/fipamo/config.json:/opt/fipamo/config.json \ -v /var/fipamo/site-settings.json:/var/fipamo/site-settings.json \ test/fipamo:latest ```
Ghost commented 2021-04-27 04:00:22 +02:00 (Migrated from koodu.ubiqueros.com)

Ok, now that Fipamo is PHP based, this needs to change a bit.

Ok, now that Fipamo is PHP based, this needs to change a bit.
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: projects/fipamo#22
No description provided.