Hi,
the answer given by Paresh Wagh is only half-way correct. I'll explain a little bit further:
Whenever you define an entry under "ports" in your compose file, it means "map this port of the host : to this port of the container". So "8071:8069" means 8071 is the host's port & 8069 is the port inside the container (odoo's default port in this case). Port 8069 must be declared as exposed in your dockerfile (EXPOSE 8069). You can expose any ports you'd like this way:
EXPOSE 8069 8070 8071 8072 ...
However, if you want to reach any of these exposed ports from the host, you have to declare a mapping just like you did.
ports:
- 8071:8069
- 1234:8070
- 5555:8071
...and so on. Note that the host's port does not have to be the same like the container's port!
Naturally, as the port on the left side of the mapping is the host's port, to reach Odoo on your localhost you have to address this port, in your case: http://localhost:8071
tl;dr:
There is no need to change the mapping from "8071:8069" to "8069:8069". Just keep in mind that the syntax is "HOST:CONTAINER" and address the host's port like localhost:HOST and you'll get there. :)