-
Hello everyone, I'm trying to use this image docker-leantime with What I'm doing is: version: '3.3'
services:
db:
image: mysql:5.7
container_name: mysql_leantime
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: '321.qwerty'
MYSQL_DATABASE: 'leantime'
MYSQL_USER: 'admin'
MYSQL_PASSWORD: '321.qwerty'
# added this lines
VIRTUAL_HOST: ${HOST_NAME}
VIRTUAL_PORT: ${PORT}
LETSENCRYPT_HOST: ${HOST_NAME}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
ports:
- "3306:3306"
networks: # set network
- webproxy
command: --character-set-server=utf8 --collation-server=utf8_unicode_ci
web:
image: leantime/leantime:latest
container_name: leantime
environment:
LEAN_DB_HOST: 'mysql_leantime'
LEAN_DB_USER: 'admin'
LEAN_DB_PASSWORD: '321.qwerty'
LEAN_DB_DATABASE: 'leantime'
expose:
- "${PORT}"
ports:
- "9000:9000"
- "${PORT}:80"
depends_on:
- db
volumes:
db_data: {}
networks: # and this
webproxy:
external: true here is the apache configuration but I don't can make it work with nginx automation |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Hello @gepd! You must add the network and the proxy environment variables in leantime container, the web service in your docker-compose file. version: '3.3'
services:
db:
image: mysql:5.7
container_name: mysql_leantime
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: '321.qwerty'
MYSQL_DATABASE: 'leantime'
MYSQL_USER: 'admin'
MYSQL_PASSWORD: '321.qwerty'
ports:
- "3306:3306"
command: --character-set-server=utf8 --collation-server=utf8_unicode_ci
web:
image: leantime/leantime:latest
container_name: leantime
environment:
LEAN_DB_HOST: 'mysql_leantime'
LEAN_DB_USER: 'admin'
LEAN_DB_PASSWORD: '321.qwerty'
LEAN_DB_DATABASE: 'leantime'
# added this lines
VIRTUAL_HOST: ${HOST_NAME}
VIRTUAL_PORT: ${PORT}
LETSENCRYPT_HOST: ${HOST_NAME}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
networks: # set network
- webproxy
expose:
- "${PORT}"
ports:
- "9000:9000"
- "${PORT}:80"
depends_on:
- db
volumes:
db_data: {}
networks: # and this
webproxy:
external: true |
Beta Was this translation helpful? Give feedback.
-
thanks @evertramos I was doing that, I copied the file wrongly When I open the upstream subdomain.domain.com {
# Cannot connect to network of this container
server 127.0.0.1 down;
## Can be connected with "webproxy" network
# leantime
server 172.30.0.7:1500;
}
|
Beta Was this translation helpful? Give feedback.
-
Dude, before I write here I have read the docs, but I don't see how having a port opened can be the source of the problem I'm having. Removing the port and (I was opening the port for debugging) |
Beta Was this translation helpful? Give feedback.
Dude,
before I write here I have read the docs, but I don't see how having a port opened can be the source of the problem I'm having.
Removing the port and
expose
do not solved my problem(I was opening the port for debugging)