File size: 1,018 Bytes
dfed233
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25f2cbf
 
 
dfed233
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM fireflyiii/core:latest

USER root

# Install MariaDB
RUN apt-get update && \
    apt-get install -y mariadb-server && \
    rm -rf /var/lib/apt/lists/* && \
    mkdir -p /run/mysqld && \
    chown mysql:mysql /run/mysqld

# Copy SQL init files
COPY initdb/ /initdb/

# Copy the env file
COPY .env /var/www/html/.env

# Fix storage permissions
RUN chown -R www-data:www-data /var/www/html/storage

# Copy startup script
COPY start.sh /start.sh
RUN chmod +x /start.sh

# Set DB connection as real env vars (Firefly reads these before .env)
ENV DB_CONNECTION=mysql \
    DB_HOST=127.0.0.1 \
    DB_PORT=3306 \
    DB_DATABASE=firefly \
    DB_USERNAME=firefly \
    DB_PASSWORD=secret_firefly_password \
    APP_KEY=SomeRandomStringOf32CharsExactly \
    TRUSTED_PROXIES=** \
    DISABLE_FRAME_HEADER=true \
    DISABLE_CSP_HEADER=true

LABEL org.opencontainers.image.source=https://github.com/McGill-NLP/webarena-pro

EXPOSE 8080

# Override entrypoint so we can start MariaDB first
ENTRYPOINT []
CMD ["/start.sh"]