Skip to content

Commit

Permalink
Fixes: setup user www-data
Browse files Browse the repository at this point in the history
  • Loading branch information
b23prodtm committed Jul 1, 2020
1 parent 24bf027 commit 87275f3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ RUN install_packages \
libmemcached-dev
# libicu libicu-dev

RUN memcached -d -l 127.0.0.1 -p 11211 -u www-data -m 16 \
&& memcached -d -l 127.0.0.1 -p 11212 -u www-data -m 16
# just containers configuration
COPY etc /etc

WORKDIR /usr/src/

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ RUN install_packages \
libmemcached-dev
# libicu libicu-dev

RUN memcached -d -l 127.0.0.1 -p 11211 -u www-data -m 16 \
&& memcached -d -l 127.0.0.1 -p 11212 -u www-data -m 16
# just containers configuration
COPY etc /etc

WORKDIR /usr/src/

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ RUN install_packages \
libmemcached-dev
# libicu libicu-dev

RUN memcached -d -l 127.0.0.1 -p 11211 -u www-data -m 16 \
&& memcached -d -l 127.0.0.1 -p 11212 -u www-data -m 16
# just containers configuration
COPY etc /etc

WORKDIR /usr/src/

Expand Down
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ A typical install script could look like the following script, for instance edit
git clone https://github.com/b23prodtm/acake2php.git
git submodule sync && git submodule update --init --recursive
npm install --no-optional
./deploy.sh x86_64 --build-deps
./deploy.sh x86_64 --docker
# reset architecture flags
./deploy.sh x86_64 --nobuild 0
./deploy.sh x86_64 --build-deps --docker

Docker builds up a new container and pushes it in registry.
It will eventually run the container as the startup script succeeds.
Expand All @@ -31,7 +32,7 @@ Get started a Docker shell, and build through local Circle CLI:
### [developers] Update the Docker deployment image
Rebuild image registry from deployment folder if you make change to the primary. E.g. change of Linux distribution. Edit the file deployment/images/primary/Dockerfile.template to your needs and perform a build from the a Docker client machine. If you make use of [Balena OS base image list](https://www.balena.io/docs/reference/base-images/base-images-ref/) repository you can use blocks to cross build for ARM ```# [ "cross-build-start" ] # [ "cross-build-end" ]``` command lines in the Dockerfile.template files. For instance, in a Terminal with Docker installed, at first dependencies may be built :

./deploy.sh armhf --build-deps
./deploy.sh armhf --nobuild --build-deps

To deploy a Raspberry Pi with Docker or Balena Cloud.

Expand Down
14 changes: 14 additions & 0 deletions etc/services.d/apache/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv sh

if [ -e ./setup ]; then
./setup
fi

# start apache
exec /usr/sbin/apachectl -DFOREGROUND;

# Restarting Apache
# Execute the command s6-svc -h /etc/services.d/apache to send a SIGHUP
# to Apache and have it reload configuration, launching new worker process(es)
# using this new configuration, while gracefully shutting down the old worker
# processes.
7 changes: 7 additions & 0 deletions etc/services.d/apache/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/with-contenv sh
# User owner setup
addgroup -g 82 -S www-data
adduser -u 82 -D -S -G www-data www-data

memcached -d -l 127.0.0.1 -p 11211 -u www-data -m 16 \
&& memcached -d -l 127.0.0.1 -p 11212 -u www-data -m 16

0 comments on commit 87275f3

Please sign in to comment.