Commit 4d57ae9c authored by Peter Tönnies's avatar Peter Tönnies Committed by Peter Tönnies

revert changes from Nick

parent 2f3a6238
Pipeline #33885298 passed with stages
in 27 minutes and 24 seconds
FROM registry.gitlab.com/foodsharing-dev/images/chat:1.1
COPY . /app/chat
WORKDIR /app/chat
COPY package.json .
# see https://github.com/npm/npm/issues/9863#issuecomment-255506533
RUN \
mkdir -p node_modules && \
mv node_modules node_modules.tmp && \
mv node_modules.tmp node_modules && \
npm install && \
npm prune
CMD ["node", "server.js"]
FROM orchardup/mysql
RUN echo Europe/Berlin > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
COPY docker/conf/db/relaxed.cnf /etc/mysql/my.cnf
RUN chmod 644 /etc/mysql/my.cnf
COPY docker/conf/db/run-tmpfs /mysql/run-tmpfs
CMD ["/mysql/run-tmpfs"]
COPY migrations /app/migrations
FROM registry.gitlab.com/foodsharing-dev/images/php:2.11
WORKDIR /app
COPY . /app
RUN chmod 777 -R /app
FROM registry.gitlab.com/foodsharing-dev/images/web:1.4
COPY . /app
version: '3'
version: '2'
services:
# nginx
#------------------------------------
# proxies connections to app/chat
web:
image: "foodsharing_${FS_ENV}_web_build"
container_name: foodsharing_ci_web
build:
context: ..
dockerfile: docker/ci/web/Dockerfile
dockerfile: docker/Dockerfile.web.ci
ports:
- "38080:8080"
- 38080:8080
expose:
- 8080
depends_on:
- app
- chat
# main php app
#------------------------------------
app:
image: "foodsharing_${FS_ENV}_app_build"
container_name: foodsharing_ci_app
image: foodsharing_ci_app
build:
context: ..
dockerfile: docker/ci/php/Dockerfile
dockerfile: docker/Dockerfile.php.ci
expose:
- 9000
depends_on:
- db
- redis
- mailqueuerunner
links:
- redis:redis
- db:db
- chat:chat
environment:
FS_ENV: test
volumes:
- selenium_downloads:/downloads
- php_vendor:/app/vendor
- vendor_cache:/app/vendor
- /dev/null:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# php mail queue runner
#------------------------------------
mailqueuerunner:
container_name: foodsharing_ci_mailqueuerunner
image: foodsharing_ci_app
command: php run.php Mails queueWorker
working_dir: /app
restart: always
depends_on:
- db
- redis
links:
- maildev
- redis:redis
- db:db
volumes:
- selenium_downloads:/downloads
- php_vendor:/app/vendor
- vendor_cache:/app/vendor
environment:
FS_ENV: test
chat:
image: "foodsharing_${FS_ENV}_chat_build"
container_name: foodsharing_ci_chat
command: sh -c "yarn && node server.js 0.0.0.0"
build:
context: ../chat
dockerfile: ci/chat/Dockerfile
dockerfile: docker/Dockerfile.chat.ci
depends_on:
- redis
environment:
REDIS_HOST: redis
expose:
- 1337
- 1338
volumes:
- chat_node_modules_cache:/app/chat/node_modules
# mysql
#------------------------------------
db:
image: "foodsharing_${FS_ENV}_db_build"
container_name: foodsharing_ci_db
build:
context: ..
dockerfile: docker/ci/db/Dockerfile
dockerfile: docker/Dockerfile.db.ci
# so we can mount tmpfs inside container
privileged: true
expose:
- 3306
ports:
- "33306:3306"
- 33306:3306
environment:
MYSQL_ROOT_PASSWORD: root
# redis
#------------------------------------
redis:
container_name: foodsharing_ci_redis
image: redis:alpine
expose:
- 6379
# selenium
#------------------------------------
......@@ -44,7 +115,7 @@ services:
# for running browser-based tests
selenium:
container_name: "foodsharing_${FS_ENV}_selenium"
container_name: foodsharing_ci_selenium
image: registry.gitlab.com/foodsharing-dev/images/selenium:1.2
shm_size: 256M
links:
......@@ -54,6 +125,20 @@ services:
volumes:
- selenium_downloads:/home/seluser/Downloads
# maildev
#------------------------------------
maildev:
command: >
bin/maildev
--web 80
--smtp 25
--hide-extensions STARTTLS
image: djfarrelly/maildev
container_name: foodsharing_ci_maildev
volumes:
selenium_downloads:
php_vendor:
vendor_cache:
client_node_modules_cache:
chat_node_modules_cache:
version: '3'
version: '2'
services:
# nginx
#------------------------------------
# proxies connections to app/chat
web:
container_name: foodsharing_dev_web
image: registry.gitlab.com/foodsharing-dev/images/web:1.5
ports:
- "18080:8080"
- 18080:8080
depends_on:
- app
- chat
volumes:
- ../:/app
# main php app
#------------------------------------
app:
container_name: foodsharing_dev_app
image: registry.gitlab.com/foodsharing-dev/images/php:2.11
working_dir: /app
expose:
- 9000
links:
- redis:redis
- db:db
- chat:chat
depends_on:
- db
- redis
- mailqueuerunner
volumes:
- ../:/app
- ${PWD}/docker/conf/app/php.dev.ini:/usr/local/etc/php/conf.d/dev-config.ini
environment:
FS_ENV: dev
# webpack client javascript
#------------------------------------
client:
container_name: foodsharing_dev_client
image: node:10.12
ports:
- "8080:8080"
- "8081:8081"
# we don't run webpack dev mode by default, make them run ./scripts/dev
command: 'true'
working_dir: /app/client
user: "${UID}"
volumes:
- ../:/app
- client-node-modules:/app/client/node_modules
environment:
HOST: 0.0.0.0
PROXY_TARGET: http://web:8080
# php mail queue runner
#------------------------------------
mailqueuerunner:
container_name: foodsharing_dev_mailqueuerunner
image: registry.gitlab.com/foodsharing-dev/images/php:2.11
command: php run.php Mails queueWorker
restart: always
depends_on:
- db
- redis
working_dir: /app
links:
- maildev
- redis:redis
- db:db
volumes:
- ../:/app
environment:
FS_ENV: dev
# light frontend
#------------------------------------
light:
container_name: foodsharing_dev_light
image: registry.gitlab.com/foodsharing-dev/images/light:1.0
command: >
sh -c "
(test -f package.json || (echo 'If you want fslight run \"git clone https://github.com/foodsharing-dev/foodsharing-light.git light\"' && exit 1)) &&
yarn &&
yarn dev
"
ports:
- 18082:8080
environment:
FOODSHARING_BACKEND: http://web:8080
CHAT_BACKEND: http://chat:1337
API_BACKEND: http://api:8000
volumes:
- ../:/app
- light-node-modules:/app/light/node_modules
- light-yarn-cache:/usr/local/share/.cache/yarn
working_dir: /app/light
# django api
#------------------------------------
api:
container_name: foodsharing_dev_api
image: python:3.5.3
command: >
sh -c "
(test -f manage.py || (echo 'If you want the api run \"git clone https://github.com/foodsharing-dev/foodsharing-django-api.git api\"' && exit 1)) &&
(command -v virtualenv || /usr/local/bin/pip install virtualenv) &&
(test -d env/bin || virtualenv --no-site-packages env) &&
(test -f env/bin/pip-sync || env/bin/pip install pip-tools) &&
env/bin/pip-sync &&
wait-for-it db:3306 &&
env/bin/python manage.py migrate &&
env/bin/python manage.py runserver 0.0.0.0:8000
"
volumes:
- ../:/app
- ../docker/conf/api/local_settings.py:/app/api/foodsharing_api/local_settings.py
- ../docker/wait-for-it:/usr/local/bin/wait-for-it
- api-virtualenv:/app/api/env
- api-pip-cache:/root/.cache/pip
environment:
REDIS_HOST: redis
ports:
- 18000:8000
working_dir: /app/api
# nodejs socket.io server
#------------------------------------
chat:
container_name: foodsharing_dev_chat
command: sh -c "yarn && node server.js 0.0.0.0"
image: registry.gitlab.com/foodsharing-dev/images/chat:1.1
working_dir: /app/chat
depends_on:
- redis
environment:
REDIS_HOST: redis
expose:
- 1337
- 1338
ports:
- "11337:1337"
- "11338:1338"
- 11337:1337
- 11338:1338
volumes:
- ../:/app
- chat-node-modules:/app/node_modules
# mysql
#------------------------------------
db:
container_name: foodsharing_dev_db
image: registry.gitlab.com/foodsharing-dev/images/db/dev:1.0
# so we can mount tmpfs inside container
privileged: true
expose:
- 3306
ports:
- "13306:3306"
- 13306:3306
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ../:/app
# redis
#------------------------------------
redis:
container_name: foodsharing_dev_redis
image: redis:alpine
ports:
- "16379:6379"
- 16379:6379
expose:
- 6379
# phpmyadmin
#------------------------------------
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: foodsharing_dev_phpmyadmin
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: root
restart: always
ports:
- "18081:80"
- 18081:80
volumes:
- ${PWD}/docker/conf/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
- /sessions
# maildev
# changed ports, since 18083 is used by virtualbox (vboxwebsrv)
#------------------------------------
maildev:
command: >
bin/maildev
--web 80
--smtp 25
--hide-extensions STARTTLS
image: djfarrelly/maildev
container_name: foodsharing_dev_maildev
ports:
- "18084:80"
- 18084:80
volumes:
client-node-modules:
light-node-modules:
light-yarn-cache:
api-virtualenv:
api-pip-cache:
chat-node-modules:
version: '3'
version: '2'
services:
# nginx
#------------------------------------
# proxies connections to app/chat
web:
container_name: foodsharing_test_web
image: registry.gitlab.com/foodsharing-dev/images/web:1.4
ports:
- "28080:8080"
- 28080:8080
expose:
- 8080
depends_on:
- app
- chat
volumes:
- ../:/app
# main php app
#------------------------------------
app:
container_name: foodsharing_test_app
image: registry.gitlab.com/foodsharing-dev/images/php:2.11
working_dir: /app
expose:
- 9000
links:
- redis:redis
- db:db
- chat:chat
depends_on:
- db
- redis
- mailqueuerunner
volumes:
- ../:/app
- selenium_downloads:/downloads
- /dev/null:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
environment:
FS_ENV: test
REDIS_HOST: redis
# webpack client javascript
#------------------------------------
client:
container_name: foodsharing_test_client
image: node:10.12
# We don't run anything long running in here yet - build is run via ./scripts/build-assets
command: 'true'
working_dir: /app/client
user: "${UID}"
volumes:
- ../:/app
# php mail queue runner
#------------------------------------
mailqueuerunner:
container_name: foodsharing_test_mailqueuerunner
image: registry.gitlab.com/foodsharing-dev/images/php:2.11
command: php run.php Mails queueWorker
working_dir: /app
restart: always
depends_on:
- db
- redis
links:
- maildev
- redis:redis
- db:db
volumes:
- ../:/app
environment:
FS_ENV: test
REDIS_HOST: redis
chat:
container_name: foodsharing_test_chat
image: registry.gitlab.com/foodsharing-dev/images/chat:1.1
command: sh -c "yarn && node server.js 0.0.0.0"
working_dir: /app/chat
depends_on:
- redis
environment:
REDIS_HOST: redis
expose:
- 1337
- 1338
volumes:
- ../:/app
# mysql
#------------------------------------
db:
container_name: foodsharing_test_db
image: registry.gitlab.com/foodsharing-dev/images/db/test:1.0
# so we can mount tmpfs inside container
privileged: true
expose:
- 3306
ports:
- "23306:3306"
- 23306:3306
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ../:/app
phpmyadmin:
ports:
- "28081:80"
# redis
#------------------------------------
maildev:
ports:
- "28083:80"
redis:
container_name: foodsharing_test_redis
image: redis:alpine
expose:
- 6379
# selenium
#------------------------------------
......@@ -38,5 +136,36 @@ services:
volumes:
- selenium_downloads:/home/seluser/Downloads
# phpmyadmin
#------------------------------------
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: foodsharing_test_phpmyadmin
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: root
restart: always
ports:
- 28081:80
volumes:
- /sessions
# maildev
#------------------------------------
maildev:
command: >
bin/maildev
--web 80
--smtp 25
--hide-extensions STARTTLS
image: djfarrelly/maildev
container_name: foodsharing_test_maildev
ports:
- 28083:80
volumes:
selenium_downloads:
version: '3'
services:
# nginx
#------------------------------------
# proxies connections to app/chat
web:
container_name: "foodsharing_${FS_ENV}_web"
image: registry.gitlab.com/foodsharing-dev/images/web:1.5
depends_on:
- app
- chat
volumes:
- ../:/app
# main php app
#------------------------------------
app:
container_name: "foodsharing_${FS_ENV}_app"
image: registry.gitlab.com/foodsharing-dev/images/php:2.11
working_dir: /app
expose:
- 9000
links:
- redis:redis
- db:db
- chat:chat
depends_on:
- db
- redis
- mailqueuerunner
volumes:
- ../:/app
environment:
FS_ENV: "${FS_ENV}"
REDIS_HOST: redis
# webpack client javascript
#------------------------------------
client:
container_name: "foodsharing_${FS_ENV}_client"
image: node:10.12
# we don't run webpack dev mode by default, make them run ./scripts/dev
command: 'true'
working_dir: /app/client
user: "${UID}"
volumes:
- ../:/app
- client_node_modules:/app/client/node_modules
environment:
HOST: 0.0.0.0
PROXY_TARGET: http://web:8080
# php mail queue runner
#------------------------------------
mailqueuerunner:
container_name: "foodsharing_${FS_ENV}_mailqueuerunner"
image: registry.gitlab.com/foodsharing-dev/images/php:2.11
command: php run.php Mails queueWorker
restart: always
depends_on:
- db
- redis
working_dir: /app
links:
- maildev
- redis:redis
- db:db
volumes:
- ../:/app
environment:
FS_ENV: "${FS_ENV}"
REDIS_HOST: redis
# nodejs socket.io server
#------------------------------------
chat:
container_name: "foodsharing_${FS_ENV}_chat"
command: sh -c "yarn && node server.js 0.0.0.0"
image: registry.gitlab.com/foodsharing-dev/images/chat:1.1
working_dir: /app/chat
depends_on:
- redis
environment:
REDIS_HOST: redis
expose:
- 1337
- 1338
volumes:
- ../:/app
- chat_node_modules:/app/node_modules
# mysql
#------------------------------------
db:
container_name: "foodsharing_${FS_ENV}_db"
image: registry.gitlab.com/foodsharing-dev/images/db/dev:1.0
# so we can mount tmpfs inside container
privileged: true
expose:
- 3306
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- ../:/app
# redis
#------------------------------------
redis:
container_name: "foodsharing_${FS_ENV}_redis"
image: redis:alpine
expose:
- 6379
# phpmyadmin
#------------------------------------
phpmyadmin:
container_name: "foodsharing_${FS_ENV}_phpmyadmin"
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: root
restart: always
volumes:
- ${PWD}/docker/conf/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
- /sessions
# maildev
#------------------------------------
maildev:
container_name: "foodsharing_${FS_ENV}_maildev"
command: >
bin/maildev
--web 80
--smtp 25
--hide-extensions STARTTLS
image: djfarrelly/maildev
volumes:
client_node_modules:
chat_node_modules: