SilvanBaach / GNX_Webapp

MIT License
1 stars 0 forks source link

Switch to docker compose #98

Closed jaypi95 closed 1 year ago

jaypi95 commented 1 year ago

Is your feature request related to a problem? Please describe. Currently it is basically impossible to remember the command to start the containers. You always have to search for it in the auto-deploy.yml. Since there is an auto-deploy-prod.yml you have to make changes in two places.

Describe the solution you'd like Instead of using a docker command, write a docker-compose.yml (chatgpt can do this). To deploy it simply copy the docker-compose.yml to the server and run docker compose up -d

Example:

version: '3.8'

networks:
reverse-proxy-network:
ipam:
config:
- subnet: 172.28.0.0/16

services:
gnxcontainer:
container_name: gnxcontainer
image: jsonderulo/genetix:latest
networks:
- reverse-proxy-network
volumes:
- /home/genetix/.env:/usr/src/app/.env

caddy:
container_name: caddy
image: caddy:2.4.5
ports:
- 80:80
- 443:443
networks:
- reverse-proxy-network
volumes:
- /home/genetix/docker/caddy/data:/data
- /home/genetix/docker/caddy/config:/config
- /home/genetix/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- /home/genetix/docker/caddy/logs/:/var/log/

Note: for some reason the indentation of the yaml got lost but you get it.