Skip to content

Commit

Permalink
Merge pull request #13 from mhzawadi/dev
Browse files Browse the repository at this point in the history
MHO/Alpine 3.15
  • Loading branch information
mhzawadi authored Apr 3, 2022
2 parents 2f6d3b4 + b036d24 commit 7ab4a96
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 8 deletions.
125 changes: 125 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
#### Jetbrains ####

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties


#### netbeans ####

nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
.nb-gradle/


#### OS X ####
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


#### Linux ####

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*


#### Windows ####

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

*.retry
.venv
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM alpine:3.14
FROM alpine:3.15
MAINTAINER Matthew Horwood <[email protected]>

RUN apk update \
&& apk add nginx php7-fpm php7-curl php7-dom php7-xml php7-xmlwriter \
php7-tokenizer php7-simplexml php7-gd php7-gmp php7-gettext php7-pcntl \
php7-mysqli php7-sockets php7-ctype php7-pecl-mcrypt php7-xmlrpc \
php7-session composer curl\
php7-mysqli php7-sockets php7-ctype php7-pecl-mcrypt php7-xmlrpc \
php7-session composer curl \
&& rm -f /var/cache/apk/* \
&& mkdir -p /var/www/html/ \
&& mkdir -p /run/nginx;
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,19 @@ docker run --name invoiceplane-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_DATABASE=invoiceplane \
-e MYSQL_USER=invoiceplane \
-e MYSQL_PASSWORD=my-secret-pw \
-v /my_dir/invoiceplane:/var/lib/mysql -d mysql:5.6
-v /my_dir/invoiceplane:/var/lib/mysql -d mysql:5.7
```

Here, we store data on the host system under `/my_dir/invoiceplane` and use a specific root password.
This will start MySQL, set the root password and create a database for invoiceplane.
This does take some time, so dont try to get invoiceplane setup too quick

### InvoicePlane

```bash
docker run -ti -d -p 80:80 --name invoiceplane --link invoiceplane-mysql:mysql mhzawadi/invoiceplane
```

We are linking the two containers and expose the HTTP port with a host URL of 127.0.0.1, you need to set the HOST_URL as nginx uses this to accept incoming requests.
We are linking the two containers and expose the HTTP port, once MySQL is up and running setup of invoiceplane should be quick.

This will also setup a database called invoiceplane with the invoiceplane user having superuser access to this database

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
labels:
- "traefik.enable=false"
invoiceplane:
image: mhzawadi/invoiceplane:latest
image: mhzawadi/invoiceplane:dev
volumes:
- invoiceplane_data:/var/www/html/uploads
environment:
Expand All @@ -31,7 +31,7 @@ services:
- MYSQL_PASSWORD=invoiceplane
- MYSQL_DB=InvoicePlane
- IP_URL=http://invoiceplane.docker.local
- DISABLE_SETUP=true
- DISABLE_SETUP=false
labels:
- "traefik.http.routers.invoiceplane.rule=Host(`invoiceplane.docker.local`)"
- "traefik.http.routers.invoiceplane.service=invoiceplane"
Expand Down

0 comments on commit 7ab4a96

Please sign in to comment.