Skip to content

Commit

Permalink
moved docker-compose files into utils/docker
Browse files Browse the repository at this point in the history
  • Loading branch information
squatica committed Feb 16, 2020
1 parent 675ed0a commit 45aac1c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions utils/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ RUN curl -o /tmp/composer-setup.php "https://getcomposer.org/installer"; \
&& groupadd --gid ${gid} node \
&& useradd --uid ${uid} --gid node --shell /bin/bash --create-home node

ENV APACHE_RUN_USER=node
ENV APACHE_RUN_GROUP=node
ENV APACHE_RUN_USER=node APACHE_RUN_GROUP=node

VOLUME /var/www/html/

Expand Down
8 changes: 6 additions & 2 deletions utils/docker/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

There are two Dockerfiles bundled in the repository - one for development, one for production deployment.

To build the production container use:
### Production

To build the production container first go to utils/docker directory, then use:
```
docker-compose build --no-cache --pull
```
Expand All @@ -16,7 +18,9 @@ Selfoss web interface will be available at http://localhost:8390

Selfoss config is mounted in a separate volume, so your custom settings should survive reboot.

To run the development container first copy .env.dist into .env and make sure the UID and GID matches your own user and group ID, otherwise the dev scripts will create files with wrong access rights.
### Development

To run the development container first make sure you are in utils/docker directory, then copy .env.dist into .env and make sure the UID and GID matches your own user and group ID, otherwise the dev scripts will create files with wrong access rights.
```
cat .env.dist | sed 's/UID=1000/UID='$(id -u)'/' | sed 's/GID=1000/GID='$(id -g)'/' > .env
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ version: "3"
services:
# clean build with `docker-compose -f docker-compose.dev.yml build --no-cache --pull app`
app:
image: selfoss/selfoss-dev
build:
args:
uid: ${UID}
gid: ${GID}
context: .
context: ../..
dockerfile: ./utils/docker/Dockerfile.dev
volumes:
- .:/var/www/html/
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml → utils/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
app:
image: selfoss/selfoss
build:
context: .
context: ../..
dockerfile: ./utils/docker/Dockerfile
volumes:
- config:/var/www/html/config/
Expand Down

0 comments on commit 45aac1c

Please sign in to comment.