ft_transcendence/docker-compose.yml
Maieul BOYER 573af0bc4b feat(infra): singular dockerfile with vite bundling
Using Vite as a bundler to allow easier builds, with shared library

Moved to a single dockerfile that takes an argument to specify which
service to use

moved some file around to faciliate bundling with vite

cried a lot
2025-07-30 21:30:04 +02:00

47 lines
1.3 KiB
YAML

networks:
transcendance-network:
driver: bridge
services:
#
# The "entry point" as in it does all of this:
# - serve files (images, static files, video)
# - redirect request to appropirate service (reverse proxy)
# - be the one that handles TLS/SSL (basically HTTPS)
# - other stuff I don't know yet
nginx:
build: ./nginx
container_name: nginx
restart: always
networks:
- transcendance-network
ports:
- '8888:443'
volumes:
# if you need to share files with nginx, you do it here.
- images-volume:/volumes/icons
environment:
# this can stay the same for developpement. This is an alias to `localhost`
- NGINX_DOMAIN=local.maix.me
# an example of an micro service. this one basically only does this:
# - handle uploading of icons
# - write icons to shared volume allowing nginx to serve them (does it better than if we did it in the service)
icons:
# build is a bit strange: it has two parts
build:
context: ./src/
args:
- SERVICE=icons
container_name: icons
restart: always
networks:
- transcendance-network
volumes:
- images-volume:/store
- sqlite-volume:/database
environment:
- USER_ICONS_STORE=/store
- DATABASE_DIR=/database
volumes:
images-volume:
sqlite-volume: