Hi, I’m attempting to use this docker-compose with latest Codi build behind nginx. Already have other services (Discourse with Postgres + rocket.chat on port 3000) running so I’m seeing this output.
Any suggestions appreciated for getting Codi running via Docker on port 3003 or similar. Looked at this issue on github, but unsure of how to resolve setting up an additional database if that makes the most sense.
All you have to do is changing the ports setting in the docker-compose.yml from:
ports:
# Ports that are published to the outside.
# The latter port is the port inside the container. It should always stay on 3000
# If you only specify a port it'll published on all interfaces. If you want to use a
# local reverse proxy, you may want to listen on 127.0.0.1.
# Example:
- "127.0.0.1:3003:3003"
#- "3000:3000"
to:
ports:
# Ports that are published to the outside.
# The latter port is the port inside the container. It should always stay on 3000
# If you only specify a port it'll published on all interfaces. If you want to use a
# local reverse proxy, you may want to listen on 127.0.0.1.
# Example:
- "127.0.0.1:3003:3000"
#- "3000:3000"
And make sure you set CMD_DOMAIN, CMD_PROTOCOL_USESSL, and CMD_URL_ADDPORT in order to make CodiMD providing the right domain for your reverse proxy setup
I’ve set all of those values and am now running into issues with already having a running database. PostgreSQL Database directory appears to contain a database; Skipping initialization
We have a Discourse forum already using Postgresql. I’m looking through documentation for a way to define a secondary database I think.
When you used the compose file you linked above, CodiMD runs an own instance postgres and will have its own database. You don’t need to change anything on your discourse postgres deployment.
If you think something is wrong wit the database and you want to start from scratch (for CodiMD) use docker-compose down -v, which will delete the containers as well as the volume. (please make sure you use this in the CodiMD project directory and not anywhere else, because it will delete volumes → data)