I have had nextjs website running on nextjs, traefik 1.7 and docker. Website was working allright but because of a SSL certificate I had to change traefik version to 2.4 so I can load my bought SSL. Since that website is working as before but images won't load. Anyone who could help?
OLD docker-compose
version: '3'
services:
loadbalancer:
restart: unless-stopped
image: traefik:1.7
command: --docker
ports:
- "80:80"
- "443:443"
- "3000:3000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
- ./acme.json:/acme.json:rw
- ./traefik.toml:/traefik.toml:rw
- ./certs:/certs:rw
command:
- --debug=false
- --logLevel=ERROR
- --defaultentrypoints=https,http
- "--entryPoints=Name:http Address::80"
- "--entryPoints=Name:https Address::443 TLS"
- --docker.endpoint=unix:///var/run/docker.sock
- --docker.watch=true
- --docker.exposedbydefault=false
- --acme.email=admin#ssupat.sk
- --acme.storage=acme.json
- --acme.entryPoint=https
- --acme.onHostRule=true
- --acme.httpchallenge.entrypoint=https
security_opt:
- no-new-privileges:true
networks:
- ssupat
cms-postgresql:
restart: unless-stopped
image: 'bitnami/postgresql:latest'
environment:
- POSTGRESQL_USERNAME=ssupat_user
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_DATABASE=ssupat_cms
ports:
- '5432'
networks:
- ssupat
volumes:
- ./db/:/bitnami/postgresql
ssupat-cms-strapi:
restart: unless-stopped
build:
context: ssupat-cms-strapi/
dockerfile: Dockerfile
environment:
DATABASE_CLIENT: postgres
DATABASE_NAME: ssupat_cms
DATABASE_HOST: cms-postgresql
DATABASE_PORT: 5432
DATABASE_USERNAME: ssupat_user
DATABASE_PASSWORD: password
networks:
- ssupat
security_opt:
- no-new-privileges:true
volumes:
- ./app:/srv/app
- ./public:/public/uploads
depends_on:
- "cms-postgresql"
labels:
traefik.frontend.rule: 'Host:cms.ssupat.sk'
traefik.frontend.redirect.regex: ^http?://cms.ssupat.sk/(.*)
traefik.frontend.redirect.replacement: https://cms.ssupat.sk/$${1}
traefik.frontend.redirect.permanent: true
traefik.http.routers.some-name.entryPoints: 'Port:80'
traefik.http.routers.ssupat-cms-strapi.rule: 'Host:cms.ssupat.sk'
traefik.http.routers.my-app.tls: true
traefik.http.routers.my-app.tls.certresolver: 'le-ssl'
traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent: true
traefik.enable: true
traefik.port: 80
traefik.protocol: http
security_opt:
- no-new-privileges:true
ssupat-web-nextjs:
restart: unless-stopped
build:
context: ssupat-web-nextjs/
dockerfile: Dockerfile
networks:
- ssupat
depends_on:
- "ssupat-cms-strapi"
- "cms-postgresql"
labels:
traefik.frontend.rule: 'Host:ssupat.sk,www.ssupat.sk'
traefik.frontend.redirect.regex: ^http?://ssupat.sk/(.*)
traefik.frontend.redirect.replacement: https://ssupat.sk/$${1}
traefik.frontend.redirect.regex: ^http?://www.ssupat.sk/(.*)
traefik.frontend.redirect.replacement: https://ssupat.sk/$${1}
traefik.frontend.redirect.permanent: true
traefik.http.routers.my-app.tls: true
traefik.http.routers.my-app.tls.certresolver: 'le-ssl'
traefik.enable: true
traefik.port: 3000
traefik.protocol: http
security_opt:
- no-new-privileges:true
networks:
ssupat:
driver: bridge
NEW docker-compose
version: '3.3'
networks:
ssupat:
driver: bridge
#networks:
#ssupat:
#external: true
services:
traefik:
#image: traefik:2.4
image: traefik:latest
container_name: traefik
volumes:
- ./certs/traefik-certs/:/etc/traefik/:ro
- /var/run/docker.sock:/var/run/docker.sock
networks:
- ssupat
ports:
- 80:80
- 443:443
- 8080:8080
#- 3000:3000
command:
- '--api.insecure=true'
- '--api.dashboard=true'
- '--api.debug=true'
- '--providers.docker=true'
- '--providers.docker.exposedByDefault=false'
- '--providers.file=true'
- '--providers.file.directory=/etc/traefik/'
- '--entrypoints.http=true'
- '--providers.docker.network=proxy'
- '--entrypoints.web.address=:80'
- '--entrypoints.websecure.address=:443'
- '--entrypoints.http.http.redirections.entrypoint.to=https'
- '--entrypoints.http.http.redirections.entrypoint.scheme=https'
#- '--entrypoints.http.http.redirections.entrypoint.permanent=true'
- '--entrypoints.https=true'
- '--log=true'
- '--log.level=DEBUG'
cms-postgresql:
restart: unless-stopped
image: 'bitnami/postgresql:latest'
environment:
- POSTGRESQL_USERNAME=ssupat_user
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_DATABASE=ssupat_cms
#- POSTGRESQL_ENABLE_TLS=yes
#- POSTGRESQL_TLS_CERT_FILE=/opt/bitnami/postgresql/certs/certs.crt
#- POSTGRESQL_TLS_KEY_FILE=/opt/bitnami/postgresql/certs/private.key
#- POSTGRESQL_TLS_CA_FILE=/opt/bitnami/postgresql/certs/ssupat.sk.ca
ports:
- '5432'
networks:
- ssupat
volumes:
- ./db/:/bitnami/postgresql
#- ./certs/traefik-certs/certs:/opt/bitnami/postgresql/certs
#- ./pg_hba.conf:/opt/bitnami/postgresql/conf/pg_hba.conf
ssupat-cms-strapi:
restart: unless-stopped
build:
context: ssupat-cms-strapi/
dockerfile: Dockerfile
environment:
DATABASE_CLIENT: postgres
DATABASE_NAME: ssupat_cms
DATABASE_HOST: cms-postgresql
DATABASE_PORT: 5432
DATABASE_USERNAME: ssupat_user
DATABASE_PASSWORD: password
networks:
- ssupat
security_opt:
- no-new-privileges:true
volumes:
- ./app/:/srv/app
- ./public/:/public/uploads
depends_on:
- "cms-postgresql"
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.ssupat-cms-strapi.rule=Host(`cms.ssupat.sk`)'
- 'traefik.http.routers.ssupat-cms-strapi.entrypoints=websecure'
- 'traefik.http.routers.ssupat-cms-strapi.tls=true'
- 'traefik.http.routers.ssupat-cms-strapi.tls.options=default'
#- 'traefik.http.routers.ssupat-cms-strapi.middlewares=authelia#docker'
- 'traefik.http.services.ssupat-cms-strapi.loadbalancer.server.port=80'
#- 'traefik.port=80'
- 'traefik.docker.network=ssupat'
- 'traefik.http.middlewares.ssupat-cms-strapi.redirectregex.regex=^http://www.cms.ssupat.sk/(.*)'
- 'traefik.http.middlewares.ssupat-cms-strapi.redirectregex.replacement=https://cms.ssupat.sk/$${1}'
- 'traefik.http.middlewares.ssupat-cms-strapi.redirectregex.permanent=true'
ssupat-web-nextjs:
restart: unless-stopped
build:
context: ssupat-web-nextjs/
dockerfile: Dockerfile
networks:
- ssupat
security_opt:
- no-new-privileges:true
depends_on:
- "ssupat-cms-strapi"
- "cms-postgresql"
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.ssupat-web-nextjs.rule=Host(`ssupat.sk`) || Host(`www.ssupat.sk`)'
#- 'traefik.http.routers.ssupat-web-nextjs.rule=Host(`ssupat.sk`, `www.ssupat.sk`)'
- 'traefik.http.routers.ssupat-web-nextjs.entrypoints=web'
#- 'traefik.http.middlewares.force_https.redirectscheme.scheme=https
- 'traefik.http.routers.ssupat-web-nextjs-secure.rule=Host(`ssupat.sk`) || Host(`www.ssupat.sk`)'
- 'traefik.http.routers.ssupat-web-nextjs-secure.entrypoints=websecure'
- 'traefik.http.routers.ssupat-web-nextjs-secure.tls=true'
- 'traefik.http.routers.ssupat-web-nextjs-secure.tls.options=default'
- 'traefik.http.services.ssupat-web-nextjs-secure.loadbalancer.server.port=3000'
#- 'traefik.port=3000'
- 'traefik.docker.network=ssupat'
#- 'traefik.http.routers.ssupat-web-nextjs-secure.middlewares=ssupat-web-nextjs-redirect'
- 'traefik.http.middlewares.ssupat-web-nextjs-secure.redirectregex.regex=^http://ssupat.sk/(.*)'
- 'traefik.http.middlewares.ssupat-web-nextjs-secure.redirectregex.replacement="https://ssupat.sk/$${1}"'
- 'traefik.http.middlewares.ssupat-web-nextjs-secure.redirectregex.permanent=true'
Related
I want to deploy a service that will allow me to use Spark and MongoDB in a Jupiter notebook.
I use docker-compose to build up the service, and it`s as followed:
version: "3.3"
volumes:
shared-workspace:
networks:
spark-net:
driver: bridge
services:
spark-master:
image: uqteaching/cloudcomputing:spark-master-v1
container_name: spark-master
networks:
- "spark-net"
ports:
- "8080:8080"
- "7077:7077"
environment:
- INIT_DAEMON_STEP=setup_spark
- "PYSPARK_PYTHON=/usr/bin/python3"
- "PYSPARK_DRIVER_PYTHON=/usr/bin/python3"
spark-worker-1:
image: uqteaching/cloudcomputing:spark-worker-v1
container_name: spark-worker-1
depends_on:
- spark-master
networks:
- "spark-net"
ports:
- "8081:8081"
environment:
- "SPARK_MASTER=spark://spark-master:7077"
- "PYSPARK_PYTHON=/usr/bin/python3"
- "PYSPARK_DRIVER_PYTHON=/usr/bin/python3"
spark-worker-2:
image: uqteaching/cloudcomputing:spark-worker-v1
container_name: spark-worker-2
depends_on:
- spark-master
networks:
- "spark-net"
ports:
- "8082:8082"
environment:
- "SPARK_MASTER=spark://spark-master:7077"
- "PYSPARK_PYTHON=/usr/bin/python3"
- "PYSPARK_DRIVER_PYTHON=/usr/bin/python3"
mongo:
image: mongo
container_name: 'mongo'
networks:
- "spark-net"
ports:
- "27017:27017"
mongo_admin:
image: mongo-express
container_name: 'mongoadmin'
networks:
- "spark-net"
depends_on:
- mongo
links:
- mongo
ports:
- "8091:8091"
jupyter-notebook:
container_name: jupyternb
image: jupyter/all-spark-notebook:42f4c82a07ff
depends_on:
- mongo
- spark-master
links:
- mongo
expose:
- "8888"
networks:
- "spark-net"
ports:
- "8888:8888"
volumes:
- ./nbs:/home/jovyan/work/nbs
- ./events:/tmp/spark-events
environment:
- "PYSPARK_PYTHON=/usr/bin/python3"
- "PYSPARK_DRIVER_PYTHON=/usr/bin/python3"
command: "start-notebook.sh \
--ip=0.0.0.0 \
--allow-root \
--no-browser \
--notebook-dir=/home/jovyan/work/nbs \
--NotebookApp.token='' \
--NotebookApp.password=''
"
And the result is something like this:
I dont know why. Even I set these 2` services to listen to a different port.
They are using 8081/tcp at the same time, which caused them both to crash.
I want to solve this.
mongo-express seems to need port 8081 internal, so use another external port to be able to login to the webui.
http://localhost:8092 would then be something like this:
mongo_admin:
image: mongo-express
container_name: 'mongoadmin'
networks:
- "spark-net"
depends_on:
- mongo
links:
- mongo
ports:
- "8092:8091"
I have a working docker-compose.yaml configuration that allow me to easily expose my services on my public domain (mydomain.com). But now, I want to also expose some of my services on a local domain (myservice.lan) so need of https.
Here is my docker-compose.yaml:
version: '3.4'
services:
traefik:
image: traefik:2.5
container_name: traefik
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${CONFIG}/traefik/acme.json:/acme.json
- ${CONFIG}/traefik/rules.toml:/etc/traefik/rules.toml
command:
- --api.insecure=true
- --api.debug=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.docker.watch=true
- --entrypoints.insecure.address=:80
- --entrypoints.secure.address=:443
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=insecure
- --certificatesresolvers.letsencrypt.acme.email=my_mail
- --certificatesresolvers.letsencrypt.acme.storage=acme.json
- --certificatesresolvers.letsencrypt.acme.caServer=https://acme-v02.api.letsencrypt.org/directory
- --certificatesresolvers.letsencrypt.acme.keyType=EC256
- --providers.file=true
- --providers.file.filename=/etc/traefik/rules.toml
- --providers.file.watch=true
labels:
- traefik.http.middlewares.wss.headers.customrequestheaders.X-Forwarded-Proto=https
grafana:
image: grafana/grafana:latest
container_name: grafana
user: ${PUID}:${PGID}
restart: unless-stopped
volumes:
- ${DATA}/grafana:/var/lib/grafana
environment:
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_DOMAIN=grafana.${DOMAIN}
- GF_SERVER_ROOT_URL=https://grafana.${DOMAIN}/
- GF_SERVER_SERVE_FROM_SUB_PATH=true
labels:
- traefik.enable=true
- traefik.http.routers.grafana.rule=Host(`grafana.${DOMAIN}`)
- traefik.http.routers.grafana.entrypoints=insecure
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
- traefik.http.routers.grafana-http.middlewares=https-redirect#docker
- traefik.http.routers.grafana-https.entrypoints=secure
- traefik.http.routers.grafana-https.rule=Host(`grafana.${DOMAIN}`)
- traefik.http.routers.grafana-https.tls=true
- traefik.http.routers.grafana-https.tls.certresolver=letsencrypt
esphome: #6052
image: esphome/esphome
container_name: esphome
restart: unless-stopped
privileged: true
volumes:
- ${CONFIG}/esphome:/config
- /etc/localtime:/etc/localtime:ro
labels:
- traefik.enable=true
- traefik.http.routers.esphome.rule=Host(`esphome.${DOMAIN_LOCAL}`)
- traefik.http.routers.esphome.entrypoints=insecure
- traefik.http.services.esphome.loadbalancer.server.port=6052
Grafana service is well exposed on my ${DOMAIN}(grafana.mydomain.com) but esphome (esphome.lan) doesn't work.
Does my configuration is bad ?
version: '3.3'
services:
#InfluxDB server
influx-db:
image: influxdb:1.8-alpine
container_name: influx-db
ports:
- 8086:8086
restart: always
volumes:
- db-data:/var/lib/influxdb
networks:
- local
#PostgreSQL Database for the application
postgresdb:
image: "postgres:12.0-alpine"
container_name: postgresdb
volumes:
- db-data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
restart: always
networks:
- local
#Fron-end Angular Application
fe:
build: './Frontend-Asset'
ports:
- 4201:4201
links:
- sm_abc_be
- sm_um_be
depends_on:
- sm_abc_be
- sm_um_be
networks:
- local
um_fe:
build: './Frontend-User'
ports:
- 4202:4202
links:
- sm_abc_be
- sm_um_be
depends_on:
- sm_abc_be
- sm_um_be
networks:
- local
#Back-end Spring Boot Application
sm_um_be:
build: './um_be'
ports:
- 8081:8081
restart: always
volumes:
- db-data/
links:
- postgresdb
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgresdb:5432/abcd
- SPRING_DATASOURCE_USERNAME=abc_user
- SPRING_DATASOURCE_PASSWORD=abcpassword
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
depends_on:
- postgresdb
networks:
- local
sm_am_be:
build: './am_be'
ports:
- 8082:8082
restart: always
volumes:
- db-data/
links:
- postgresdb
- influx-db
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgresdb:5432/am_uuid?currentSchema=abc
- SPRING_DATASOURCE_USERNAME=am_db_user
- SPRING_DATASOURCE_PASSWORD=abcpassword
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
depends_on:
- postgresdb
- influx-db
networks:
- local
#Volumes for DB data
volumes:
db-data:
networks:
local:
driver: bridge
I'm trying to run a Nextcloud instance on my Raspbery Pi 3B+ using a docker-compose file from this source: https://blog.ssdnodes.com/blog/installing-nextcloud-docker/
This works out of the box without any issues on a Ubuntu Server.
I've replaced the following images to be compatible with the arm infrastructure of the Pi:
jwilder/nginx-proxy:alpine with braingamer/nginx-proxy-arm or budry/jwilder-nginx-proxy-arm (I tried both)
jrcs/letsencrypt-nginx-proxy-companion with budry/jrcs-letsencrypt-nginx-proxy-companion-arm
mariadb with linuxserver/mariadb
nextcloud:latest with linuxserver/nextcloud
Unfortunately this doesn't work on the Pi, the Pi returns first a 502 Bad Gateway, then after some time the error ERR_TOO_MANY_REDIRECTS.
What am I doing wrong?
Thanks
My docker-compose.yml:
version: '3'
services:
proxy:
image: braingamer/nginx-proxy-arm
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
container_name: nextcloud-proxy
networks:
- nextcloud_network
ports:
- 80:80
- 443:443
volumes:
- ./proxy/conf.d:/etc/nginx/conf.d:rw
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
- ./proxy/html:/usr/share/nginx/html:rw
- ./proxy/certs:/etc/nginx/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped
letsencrypt:
image: budry/jrcs-letsencrypt-nginx-proxy-companion-arm
container_name: nextcloud-letsencrypt
depends_on:
- proxy
networks:
- nextcloud_network
volumes:
- ./proxy/certs:/etc/nginx/certs:rw
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
- ./proxy/html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
db:
image: linuxserver/mariadb
container_name: nextcloud-mariadb
networks:
- nextcloud_network
volumes:
- db:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=***PASSWORD***
- MYSQL_PASSWORD=***PASSWORD***
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
ports:
- 3306:3306
restart: unless-stopped
app:
image: linuxserver/nextcloud
container_name: nextcloud-app
networks:
- nextcloud_network
depends_on:
- letsencrypt
- proxy
- db
volumes:
- nextcloud:/var/www/html
- ./app/config:/var/www/html/config
- ./app/custom_apps:/var/www/html/custom_apps
- ./app/data:/var/www/html/data
- ./app/themes:/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/London
- VIRTUAL_HOST=nextcloud.domain.tld
- LETSENCRYPT_HOST=nextcloud.domain.tld
- LETSENCRYPT_EMAIL=mail#nextcloud.domain.tld
volumes:
nextcloud:
db:
networks:
nextcloud_network:
The tutorial used a Nginx reverse proxy and Let’s Encrypt, for the latter you need a valid domain. If you look at your compose file for linuxserver/nextcloud under environment, it asks for a domain for VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL. It then tries to create a ssl certificate for the specified domain (nextcloud.domain.tld), which is not valid, so it doesn't work.
This was the case for me, so I just removed the proxy and ssl from my compose file and nextcloud works now :)
Here is my current working compose file:
version: '3'
services:
db:
image: tobi312/rpi-mariadb:10.5
container_name: nextcloud-mariadb
networks:
- nextcloud_network
volumes:
- db:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_ROOT_PASSWORD=very_secure_password
- MYSQL_PASSWORD=very_secure_password
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
restart: unless-stopped
app:
image: nextcloud:latest
container_name: nextcloud-app
networks:
- nextcloud_network
depends_on:
- db
volumes:
- nextcloud:/var/www/html
- ./app/config:/var/www/html/config
- ./app/custom_apps:/var/www/html/custom_apps
- ./app/data:/var/www/html/data
- ./app/themes:/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
ports:
- 80:80
volumes:
nextcloud:
db:
networks:
nextcloud_network:
driver: bridge
Hope it helps.
I'm trying to build docker container for laravel with docker-compose.yml.
I hove to build database container for mysql5.7.
Mysql8 cannot be used on my server witch connected.
There is my docker-compose.yml file.
version: "3"
services:
app:
build:
context: ./docker/php
args:
- TZ=${TZ}
ports:
- ${APP_PORT}:8000
volumes:
- ${PROJECT_PATH}:/work
- ./docker/ash:/etc/profile.d
- ./docker/php/psysh:/root/.config/psysh
- ./logs:/var/log/php
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
working_dir: /work
environment:
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_DATABASE=${DB_NAME}
- DB_USERNAME=${DB_USER}
- DB_PASSWORD=${DB_PASS}
- TZ=${TZ}
- MAIL_HOST=${MAIL_HOST}
- MAIL_PORT=${MAIL_PORT}
- CACHE_DRIVER=redis
- SESSION_DRIVER=redis
- QUEUE_DRIVER=redis
- REDIS_HOST=redis
web:
image: nginx:1.17-alpine
depends_on:
- app
ports:
- ${WEB_PORT}:80
volumes:
- ${PROJECT_PATH}:/work
- ./logs:/var/log/nginx
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
environment:
- TZ=${TZ}
db:
image: mysql:5.7
volumes:
- db-store:/var/lib/mysql
- ./logs:/var/log/mysql
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
environment:
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- TZ=${TZ}
ports:
- ${DB_PORT}:3306
db-testing:
image: mysql:5.7
volumes:
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
tmpfs:
- /var/lib/mysql
- /var/log/mysql
environment:
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- TZ=${TZ}
ports:
- ${DB_TESTING_PORT}:3306
node:
image: node:12.13-alpine
tty: true
volumes:
- ${PROJECT_PATH}:/work
working_dir: /work
redis:
image: redis:5.0-alpine
volumes:
- redis-store:/data
mail:
image: mailhog/mailhog
ports:
- ${MAILHOG_PORT}:8025
volumes:
db-store:
redis-store:
When I execute "docker-compose build" in terminal, it's successfully done, but db container and db-testing container has status "EXIT: 1" or "EXIT: 2".
So, Could you teach me what's wrong.