appleberry

joined 10 months ago
[โ€“] appleberry@aussie.zone 1 points 4 months ago

Thanks. I did create a persistent volume, but I thought that deleting the files would trigger them to be recreated when the container restarts.

 

I have set up my site.conf as a site.conf.template file in /etc/nginx/templates/

It has successfully been copied into etc/nginx/conf.d before, but after making some changes to the template and rebuilding the container, it is not copying again. There are no errors in the docker log for the nginx container, in fact it is running (without the sites config).

I have tried changing the local copy of conf.d to 775, but other than that I can't think of what would be stopping it from copying or triggering. Or where to look for error logs. ๐Ÿ™

[โ€“] appleberry@aussie.zone 3 points 4 months ago

SOLUTION: The log file is definitely changing the case of the variables as they appear in .conf ๐Ÿ˜….

3
submitted 4 months ago* (last edited 4 months ago) by appleberry@aussie.zone to c/docker@programming.dev
 

I'm new to docker.

I'm trying to run the nginx/alpine container and getting this error:

2025/08/10 01:09:55 [emerg] 1#1: unknown "flask_port" variable nginx: [emerg] unknown "flask_port" variable

Strangely, there is no flask_port reference in my codebase (having grepped for it in ./*). There is FLASK_PORT, but it seems unlikely that that the case for the missing variable would get changed before outputting to the log file, right?!

I have rebuilt the container many times and cleared the cache. But the message persists.

There is a reference to FLASK_PORT in the .conf file but changing it doesn't change the error message, so I assume it isn't coming from there.

No reference to it in docker-compose.yml or Dockerfile.

Any tips on how to troubleshoot something like this? ๐Ÿ™

[โ€“] appleberry@aussie.zone 1 points 8 months ago* (last edited 8 months ago)

https://docs.racket-lang.org/guide/define-struct.html#(part._trans-struct) Making the structs transparent seems to be a better work-around for now.

[โ€“] appleberry@aussie.zone 2 points 8 months ago* (last edited 8 months ago) (1 children)

I appreciate the effort! Further to this, I seems like if I change my function and the expected result to compare lists instead of 'make-ta' they pass!

(check-expect (sub-slot 1 SOBA) (make-ta "Soba" 1 (list 3))) ; subtract one shift <--- FAIL
(check-expect (sub-slot 3 SOBA) (make-ta "Soba" 1 (list 1))) ; subtract a different shift <--- FAIL

(define (sub-slot slot ta)
  (cond [(and (> (ta-max ta) 0) (> (length (ta-avail ta)) 1))
              (make-ta (ta-name ta) 
                       (sub1 (ta-max ta))
                       (remq slot (ta-avail ta)))]
              [else empty]))
(check-expect (sub-slot 1 SOBA) (make-ta "Soba" 1 (list 3))) ; subtract one shift <--- FAIL
(check-expect (sub-slot 3 SOBA) (list "Soba" 1 (list 1))) ; subtract a different shift <--- PASS

(define (sub-slot slot ta)
  (cond [(and (> (ta-max ta) 0) (> (length (ta-avail ta)) 1))
              (list (ta-name ta) 
                       (sub1 (ta-max ta))
                       (remq slot (ta-avail ta)))]
              [else empty]))

This is the final problem of the course ๐Ÿ˜…. I'm going to try and get to the bottom of this rather than work around with lists (which is what I did last time). I must have some misunderstanding with make- functions...

 

How can I compare truncated test results in DrRacket?

Actual value (make-ta ...) differs from (make-ta ...), the expected value.