simpler Dockerfile and compose test
This commit is contained in:
@@ -7,8 +7,12 @@ ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV FLASK_ENV=production
|
||||
ENV FLASK_SECRET=production-secret-change-me
|
||||
|
||||
# Set apt sources to use a faster mirror: https://mirror.init7.net/debian/
|
||||
RUN sed -i 's|http://deb.debian.org/debian|https://mirror.init7.net/debian|g' /etc/apt/sources.list
|
||||
# Find location of apt sources list and change to a faster mirror
|
||||
RUN [ -f /etc/apt/sources.list ] && \
|
||||
echo "/etc/apt/sources.list exists, proceeding to modify it." \
|
||||
&& sed -i 's|http://deb.debian.org/debian|https://mirror.init7.net/debian|g' /etc/apt/sources.list \
|
||||
|| \
|
||||
(echo "/etc/apt/sources.list does not exist, exiting.")
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
||||
@@ -25,8 +25,6 @@ services:
|
||||
- type: bind
|
||||
source: ./logs
|
||||
target: /app/logs
|
||||
depends_on:
|
||||
- mysql
|
||||
labels:
|
||||
- coolify.managed=true
|
||||
- traefik.enable=true
|
||||
@@ -37,24 +35,6 @@ services:
|
||||
- jobs-network
|
||||
restart: unless-stopped
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD="M11ffpgm."
|
||||
- MYSQL_DATABASE=jobs
|
||||
- MYSQL_USER=jobs
|
||||
- MYSQL_PASSWORD=jobdb
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
- ./mysql-init:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
- jobs-network
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
|
||||
networks:
|
||||
jobs-network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user