Application
is a separated folder inplatform_apps/
ordeploy_apps/
- All applications files uploads to
/var/apps
- Every application with
docker-compose.yml
would be started withdocker-compose up -d
. Look atcloud-init.yaml
for more info.
cp .env.dist .env
make run
- To get service logs
journalctl -u service-name.service
- To start/stop service
systemctl start/stop service-name.service
- add directory with docker-compose.yml to /platform_apps
- use
ingress
external network to enable ingress routing to your container. - to set up ingress:
- use
- add env variables to terraform
Docker-compose
services:
nginx:
image: "nginx:latest"
labels:
- "traefik.http.routers.index.rule=Host(`${INDEX_HOSTNAME}`)"
- "traefik.http.routers.index.rule=PathPrefix(`/test`)"
- "traefik.http.routers.index.middlewares=myrouter-stripprefix"
- "traefik.http.middlewares.index-stripprefix.stripprefix.prefixes=/test,/test/"
- "traefik.http.routers.index.tls=true"
- "traefik.http.routers.index.tls.certresolver=letsencrypt"
networks:
- ingress
environment:
- INDEX_HOSTNAME
volumes:
- ./conf.d:/etc/nginx/conf.d
networks:
ingress:
external: true
Docker run
docker run \
-l 'traefik.http.routers.myrouter.rule=PathPrefix(`/test`)' \
-l 'traefik.http.routers.myrouter.middlewares=myrouter-stripprefix' \
-l 'traefik.http.middlewares.myrouter-stripprefix.stripprefix.prefixes=/test,/test/' \
--network=ingress \
nginx