Skip to content

Commit

Permalink
Update building of the Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
a-melnikov committed Feb 13, 2023
1 parent a5058e2 commit 153dadf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 426 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
COMPOSE_PROJECT_NAME=tramaint
COMPOSE_FILE=docker/docker-compose.yml

TRANS_MAINTAIN_INSERT_MISSED_KEYS=no
23 changes: 23 additions & 0 deletions bin/ci/composer_installer
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

EXPECTED_CHECKSUM="$(curl -sS https://composer.github.io/installer.sig)"

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"

if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi

php composer-setup.php --quiet
RESULT=$?

chmod +x composer.phar
rm composer-setup.php
[ ! -d "/path/to/dir" ] && mkdir -p /usr/local/bin
mv composer.phar /usr/local/bin/composer

exit $RESULT
6 changes: 4 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
version: '3.1'

services:
tramaint-php:
php:
build:
context: ..
dockerfile: docker/.Dockerfile
args:
PHP_IMAGE: ${PHP_IMAGE:-php:7.4-cli}
PHP_XDEBUG_PORT: ${PHP_XDEBUG_PORT:-9003}
PHP_XDEBUG_VERSION: ${PHP_XDEBUG_VERSION:-3.1.5}
restart: on-failure
ports:
- 9003:9003
- "9003:9003"
volumes:
- ../:/srv/app
Loading

0 comments on commit 153dadf

Please sign in to comment.