New project structure
Beta of extract.js for extracting english locale
This commit is contained in:
parent
e18d2b2f84
commit
2edbd67205
247 changed files with 6405 additions and 4237 deletions
13
docker/Dockerfile
Normal file
13
docker/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
FROM node:8.6
|
||||
|
||||
# First install dependencies
|
||||
COPY ../server/package.json ./app/
|
||||
WORKDIR /app/
|
||||
ENV NODE_ENV production
|
||||
RUN npm install --no-progress --production && npm install --no-progress passport-ldapjs passport-ldapauth
|
||||
# Later, copy the app files. That improves development speed as buiding the Docker image will not have
|
||||
# to download and install all the NPM dependencies every time there's a change in the source code
|
||||
COPY .. /app
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["bash", "/app/docker-entrypoint.sh"]
|
||||
CMD ["node", "index.js"]
|
14
docker/docker-compose.override.yml.tmpl
Normal file
14
docker/docker-compose.override.yml.tmpl
Normal file
|
@ -0,0 +1,14 @@
|
|||
version: '2'
|
||||
services:
|
||||
mysql:
|
||||
restart: always
|
||||
redis:
|
||||
restart: always
|
||||
mailtrain:
|
||||
build: ./
|
||||
# volumes:
|
||||
# - ./:/app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
restart: always
|
||||
|
33
docker/docker-compose.yml
Normal file
33
docker/docker-compose.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
# FIXME - this is not yet upgraded to Mailtrain 2
|
||||
|
||||
version: '2'
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=mailtrain
|
||||
- MYSQL_DATABASE=mailtrain
|
||||
- MYSQL_USER=mailtrain
|
||||
- MYSQL_PASSWORD=mailtrain
|
||||
volumes:
|
||||
- mailtrain-mysq-data:/var/lib/mysql
|
||||
redis:
|
||||
image: redis:3.0
|
||||
volumes:
|
||||
- mailtrain-redis-data:/data
|
||||
mailtrain:
|
||||
image: mailtrain:latest
|
||||
depends_on:
|
||||
- mysql
|
||||
- redis
|
||||
volumes:
|
||||
- mailtrain-node-config:/app/config
|
||||
- mailtrain-node-data:/app/public/grapejs/uploads
|
||||
- mailtrain-node-data:/app/public/mosaico/uploads
|
||||
- mailtrain-node-reports:/app/protected/reports
|
||||
volumes:
|
||||
mailtrain-mysq-data: {}
|
||||
mailtrain-redis-data: {}
|
||||
mailtrain-node-data: {}
|
||||
mailtrain-node-config: {}
|
||||
mailtrain-node-reports: {}
|
18
docker/docker-entrypoint.sh
Normal file
18
docker/docker-entrypoint.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ ! -f "/app/config/production.toml" ] ; then
|
||||
echo "No production.toml, copying from docker-production.toml.tmpl"
|
||||
cp /app/config/docker-production.toml.tmpl /app/config/production.toml
|
||||
fi
|
||||
if [ ! -f "/app/workers/reports/config/production.toml" ] ; then
|
||||
echo "No production.toml for reports"
|
||||
if [ -f "/app/config/production.toml" ] ; then
|
||||
echo "copying config/production.toml to reports config directory"
|
||||
cp /app/config/production.toml /app/workers/reports/config/production.toml
|
||||
else
|
||||
echo "copying config/docker-production.toml.tmpl to reports config directory as production.toml"
|
||||
cp /app/config/docker-production.toml.tmpl /app/workers/reports/config/production.toml
|
||||
fi
|
||||
fi
|
||||
exec "$@"
|
Loading…
Add table
Add a link
Reference in a new issue